silence headers already sent warning. issue #596
This commit is contained in:
parent
69e1f6e4ba
commit
f76046b612
@ -118,18 +118,21 @@ class Wiki extends \Zotlabs\Web\Controller {
|
|||||||
\Zotlabs\Lib\ExtendedZip::zipTree($w['path'], $zip_filepath, \ZipArchive::CREATE);
|
\Zotlabs\Lib\ExtendedZip::zipTree($w['path'], $zip_filepath, \ZipArchive::CREATE);
|
||||||
|
|
||||||
// Output the file for download
|
// Output the file for download
|
||||||
|
|
||||||
header('Content-disposition: attachment; filename="' . $zip_filename . '.zip"');
|
header('Content-disposition: attachment; filename="' . $zip_filename . '.zip"');
|
||||||
header("Content-Type: application/zip");
|
header('Content-Type: application/zip');
|
||||||
|
|
||||||
$success = readfile($zip_filepath);
|
$success = readfile($zip_filepath);
|
||||||
|
|
||||||
if($success) {
|
if(!$success) {
|
||||||
rrmdir($zip_folderpath); // delete temporary files
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
rrmdir($zip_folderpath); // delete temporary files
|
|
||||||
logger('Error downloading wiki: ' . $resource_id);
|
logger('Error downloading wiki: ' . $resource_id);
|
||||||
|
notice(t('Error downloading wiki: ' . $resource_id) . EOL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// delete temporary files
|
||||||
|
rrmdir($zip_folderpath);
|
||||||
|
killme();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (argc()) {
|
switch (argc()) {
|
||||||
|
Reference in New Issue
Block a user