diff options
author | Mario Vavti <mario@mariovavti.com> | 2016-11-23 10:28:37 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2016-11-23 10:28:37 +0100 |
commit | f76046b6120aec97f96eef8e83b603cc0a54438e (patch) | |
tree | 08ef460a6a9754e9e49761b36c7d571e2fafe203 /Zotlabs/Module/Wiki.php | |
parent | 69e1f6e4ba9b3f33ab9b93541fdd68d0f5d6d01a (diff) | |
download | volse-hubzilla-f76046b6120aec97f96eef8e83b603cc0a54438e.tar.gz volse-hubzilla-f76046b6120aec97f96eef8e83b603cc0a54438e.tar.bz2 volse-hubzilla-f76046b6120aec97f96eef8e83b603cc0a54438e.zip |
silence headers already sent warning. issue #596
Diffstat (limited to 'Zotlabs/Module/Wiki.php')
-rw-r--r-- | Zotlabs/Module/Wiki.php | 15 |
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()) { |