diff --git a/op/op.Search.php b/op/op.Search.php index d2b75aef3..75dbd4b44 100644 --- a/op/op.Search.php +++ b/op/op.Search.php @@ -423,12 +423,21 @@ if(isset($_GET["fullsearch"]) && $_GET["fullsearch"]) { } } $filename = tempnam('/tmp', ''); - $downmgr->createArchive($filename); - header("Content-Transfer-Encoding: binary"); - header("Content-Length: " . filesize($filename)); - header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); - header("Content-Type: application/zip"); - header("Cache-Control: must-revalidate"); + if(isset($_GET['includecontent']) && $_GET['includecontent']) { + $downmgr->createArchive($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".zip\""); + header("Content-Type: application/zip"); + header("Cache-Control: must-revalidate"); + } else { + $downmgr->createToc($filename); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: " . filesize($filename)); + header("Content-Disposition: attachment; filename=\"export-" .date('Y-m-d') . ".xls\""); + header("Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml. sheet"); + header("Cache-Control: must-revalidate"); + } readfile($filename); unlink($filename);