aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Wiki.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Wiki.php b/Zotlabs/Module/Wiki.php
index 53c267a93..a73364b06 100644
--- a/Zotlabs/Module/Wiki.php
+++ b/Zotlabs/Module/Wiki.php
@@ -118,18 +118,21 @@ class Wiki extends \Zotlabs\Web\Controller {
\Zotlabs\Lib\ExtendedZip::zipTree($w['path'], $zip_filepath, \ZipArchive::CREATE);
// Output the file for download
+
header('Content-disposition: attachment; filename="' . $zip_filename . '.zip"');
- header("Content-Type: application/zip");
+ header('Content-Type: application/zip');
$success = readfile($zip_filepath);
- if($success) {
- rrmdir($zip_folderpath); // delete temporary files
- }
- else {
- rrmdir($zip_folderpath); // delete temporary files
+ if(!$success) {
logger('Error downloading wiki: ' . $resource_id);
+ notice(t('Error downloading wiki: ' . $resource_id) . EOL);
}
+
+ // delete temporary files
+ rrmdir($zip_folderpath);
+ killme();
+
}
switch (argc()) {