diff options
author | prashantsinalkar | 2017-01-09 17:09:00 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-01-09 17:09:00 +0530 |
commit | 7121bf5f8c6b9c95e1736629055096abf7decba5 (patch) | |
tree | e21628ffca6739854f6221609fca8bcb0fe7418f | |
parent | 205c03ca3b0c7caaf42ba2e7649edd4ee06ccc44 (diff) | |
download | DWSIM_textbook_companion-7121bf5f8c6b9c95e1736629055096abf7decba5.tar.gz DWSIM_textbook_companion-7121bf5f8c6b9c95e1736629055096abf7decba5.tar.bz2 DWSIM_textbook_companion-7121bf5f8c6b9c95e1736629055096abf7decba5.zip |
changed root path
-rwxr-xr-x | download.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/download.inc b/download.inc index be57897..3ba603e 100755 --- a/download.inc +++ b/download.inc @@ -120,6 +120,7 @@ function textbook_companion_download_chapter() { $chapter_id = arg(3); //var_dump($chapter_id);die; + global $root_path; $root_path = textbook_companion_path(); /* get example data */ /*$chapter_q = db_query("SELECT * FROM {textbook_companion_chapter} WHERE id = %d", $chapter_id); @@ -131,9 +132,9 @@ function textbook_companion_download_chapter() $chapter_data = $result->fetchObject(); $CH_PATH = 'CH' . $chapter_data->number . '/'; /* zip filename */ -if (!is_dir($root_temp_path . 'tbc_download_temp')) - mkdir($root_temp_path . 'tbc_download_temp'); - $zip_filename = $root_temp_path .'tbc_download_temp/' . 'zip-' . time() . '-' . rand(0, 999999) . '.zip'; +if (!is_dir($root_path . 'tbc_download_temp')) + mkdir($root_path . 'tbc_download_temp'); + $zip_filename = $root_path .'tbc_download_temp/' . 'zip-' . time() . '-' . rand(0, 999999) . '.zip'; /* creating zip archive on the server */ $zip = new ZipArchive; |