diff options
-rwxr-xr-x | full_download.inc | 5 | ||||
-rwxr-xr-x | run.inc | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/full_download.inc b/full_download.inc index 1fd9b58..15be090 100755 --- a/full_download.inc +++ b/full_download.inc @@ -23,7 +23,7 @@ function dwsim_flowsheet_download_full_project() while ($flowsheet_udc_row = $flowsheet_udc_q->fetchObject()) { if ($flowsheet_udc_row->user_defined_compound_filepath || $flowsheet_udc_row->user_defined_compound_filepath != 'NULL') { $USER_DEFINED_PATH = 'user_defined_compound/'; - $zip->addFile($root_path . $FLOWSHEET_PATH . '/' . $flowsheet_udc_row->user_defined_compound_filepath, $USER_DEFINED_PATH . str_replace(' ', '_', basename($flowsheet_udc_row->user_defined_compound_filepath))); + $zip->addFile($root_path . $FLOWSHEET_PATH . '/' . $flowsheet_udc_row->user_defined_compound_filepath, $FLOWSHEET_PATH . $USER_DEFINED_PATH . str_replace(' ', '_', basename($flowsheet_udc_row->user_defined_compound_filepath))); } //$flowsheet_udc_row->user_defined_compound_filepath || $flowsheet_udc_row->user_defined_compound_filepath != 'NULL' } //$flowsheet_udc_row = $flowsheet_udc_q->fetchObject() $query = db_select('dwsim_flowsheet_submitted_abstracts_file'); @@ -31,7 +31,8 @@ function dwsim_flowsheet_download_full_project() $query->condition('proposal_id', $flowsheet_id); $flowsheet_f_q = $query->execute(); while ($flowsheet_f_row = $flowsheet_f_q->fetchObject()) { - $zip->addFile($root_path . $FLOWSHEET_PATH . '/' . $flowsheet_f_row->filepath, str_replace(' ', '_', basename($flowsheet_f_row->filename))); + + $zip->addFile($root_path . $FLOWSHEET_PATH . '/' . $flowsheet_f_row->filepath, $FLOWSHEET_PATH . str_replace(' ', '_', basename($flowsheet_f_row->filename))); } //$flowsheet_f_row = $flowsheet_f_q->fetchObject() $zip_file_count = $zip->numFiles; $zip->close(); @@ -58,7 +58,7 @@ function dwsim_flowsheet_project_details_callback($form, $form_state) $flowsheet_details = _flowsheet_information($flowsheet_default_value); $provider = user_load($flowsheet_details->uid); if ($flowsheet_details->uid > 0) { - $commands[] = ajax_command_html('#ajax_selected_flowsheet', l('Download Flowsheet', 'flowsheeting-project/full-download/project/' . $flowsheet_default_valuei,array('attributes' => array('title' => 'This is a zip file containing a pdf (abstract) and a dwxml/dwxmz file which is the DWSIM flow sheet which is to be viewed by right clicking on the file and opening with DWSIM.')))); + $commands[] = ajax_command_html('#ajax_selected_flowsheet', l('Download Flowsheet', 'flowsheeting-project/full-download/project/' . $flowsheet_default_value,array('attributes' => array('title' => 'This is a zip file containing a pdf (abstract) and a dwxml/dwxmz file which is the DWSIM flow sheet which is to be viewed by right clicking on the file and opening with DWSIM.')))); } //$flowsheet_details->uid > 0 else { $commands[] = ajax_command_html('#ajax_selected_flowsheet', ''); |