support export of folders in excel file

This commit is contained in:
Uwe Steinmann 2025-02-03 15:21:14 +01:00
parent 435c94f585
commit ca29a27187
2 changed files with 13 additions and 3 deletions

View File

@ -678,7 +678,7 @@ if($fullsearch) {
$entries = array(); $entries = array();
$fcount = 0; $fcount = 0;
if(!isset($_GET['action']) || $_GET['action'] != 'export') { // if(!isset($_GET['action']) || $_GET['action'] != 'export') {
if($resArr['folders']) { if($resArr['folders']) {
foreach ($resArr['folders'] as $entry) { foreach ($resArr['folders'] as $entry) {
if ($entry->getAccessMode($user) >= M_READ) { if ($entry->getAccessMode($user) >= M_READ) {
@ -687,7 +687,7 @@ if($fullsearch) {
} }
} }
} }
} // }
$dcount = 0; $dcount = 0;
if($resArr['docs']) { if($resArr['docs']) {
foreach ($resArr['docs'] as $entry) { foreach ($resArr['docs'] as $entry) {

View File

@ -243,6 +243,16 @@ $(document).ready(function() {
} }
} }
} }
if($extraheader = $this->callHook('extraDownloadFolderHeader'))
$downmgr->addFolderHeader($extraheader);
foreach($entries as $entry) {
if($entry->isType('folder')) {
if(empty($marks) || !empty($marks['F'.$entry->getId()])) {
$extracols = $this->callHook('extraDownloadFolderColumns', $entry);
$downmgr->addFolderItem($entry, $extracols);
}
}
}
$filename = tempnam(sys_get_temp_dir(), ''); $filename = tempnam(sys_get_temp_dir(), '');
if($includecontent) { if($includecontent) {
$downmgr->createArchive($filename); $downmgr->createArchive($filename);
@ -1463,7 +1473,7 @@ $(document).ready(function() {
/* Batch operations {{{ */ /* Batch operations {{{ */
if($settings->_batchOperations && $total) if($settings->_batchOperations && $total)
$this->contentHeading(getMLText('batch_operation')); $this->contentHeading(getMLText('batch_operation'));
if($totaldocs) { if($totaldocs || $totalfolders) {
if(in_array('export', $settings->_batchOperations)) { if(in_array('export', $settings->_batchOperations)) {
ob_start(); ob_start();
$this->formField( $this->formField(