diff options
author | Sashi20 | 2019-02-26 16:10:51 +0530 |
---|---|---|
committer | GitHub | 2019-02-26 16:10:51 +0530 |
commit | 18fa44fbee6d27006428c5408d053d2bf2576f5c (patch) | |
tree | 57faffe535ceb9f3065a25acbe4a17fd3f4dae23 | |
parent | 6fbe169f3bd8aa2d70d406728c718d64f72e1c4d (diff) | |
parent | e9da9c0866648103f8b658b4efd5ed110f7dc231 (diff) | |
download | om_pssp-18fa44fbee6d27006428c5408d053d2bf2576f5c.tar.gz om_pssp-18fa44fbee6d27006428c5408d053d2bf2576f5c.tar.bz2 om_pssp-18fa44fbee6d27006428c5408d053d2bf2576f5c.zip |
Merge pull request #7 from Sashi20/master
Path of the resource file updated when proposal is edited
-rwxr-xr-x | manage_proposal.inc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc index 8f8f08a..e6f6bb1 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -922,6 +922,8 @@ function om_pssp_proposal_edit_form_submit($form, &$form_state) } //$form_state['values']['delete_proposal'] == 1 /* update proposal */ $v = $form_state['values']; + $str = substr($proposal_data->samplefilepath,strrpos($proposal_data->samplefilepath, '/')); + $resource_file =ltrim($str, '/'); $project_title = $v['project_title']; $proposar_name = $v['name_title'] . ' ' . $v['contributor_name']; $university = $v['university']; @@ -934,6 +936,7 @@ function om_pssp_proposal_edit_form_submit($form, &$form_state) { return; } + $samplefilepath = $directory_name . '/' . $resource_file; $query = "UPDATE om_pssp_proposal SET name_title=:name_title, contributor_name=:contributor_name, @@ -943,7 +946,8 @@ function om_pssp_proposal_edit_form_submit($form, &$form_state) state=:state, project_title=:project_title, reference=:reference, - directory_name=:directory_name + directory_name=:directory_name, + samplefilepath=:samplefilepath WHERE id=:proposal_id"; $args = array( ':name_title' => $v['name_title'], @@ -955,6 +959,7 @@ function om_pssp_proposal_edit_form_submit($form, &$form_state) ':project_title' => $project_title, ':reference' => $v['reference'], ':directory_name' => $directory_name, + ':samplefilepath' => $samplefilepath, ':proposal_id' => $proposal_id ); $result = db_query($query, $args); |