diff options
author | Sashi20 | 2019-02-26 15:43:58 +0530 |
---|---|---|
committer | Sashi20 | 2019-02-26 15:43:58 +0530 |
commit | e9da9c0866648103f8b658b4efd5ed110f7dc231 (patch) | |
tree | 57faffe535ceb9f3065a25acbe4a17fd3f4dae23 | |
parent | 1ed6e60e8e4acfb819fdfdd2821401f171f3e545 (diff) | |
download | om_pssp-e9da9c0866648103f8b658b4efd5ed110f7dc231.tar.gz om_pssp-e9da9c0866648103f8b658b4efd5ed110f7dc231.tar.bz2 om_pssp-e9da9c0866648103f8b658b4efd5ed110f7dc231.zip |
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); |