Allow specifying export Structure to get a flat zip

This commit is contained in:
Isaac Connor 2021-08-06 13:10:44 -04:00
parent 222909feb3
commit 1f1678064e
1 changed files with 12 additions and 6 deletions

View File

@ -74,10 +74,15 @@ if ( canView('Events') ) {
else else
$exportCompress = false; $exportCompress = false;
if ( !empty($_REQUEST['exportStructure']) )
$exportStructure = $_SESSION['export']['structure'] = $_REQUEST['exportStructure'];
else
$exportStructure = false;
session_write_close(); session_write_close();
$exportIds = !empty($_REQUEST['eids']) ? $_REQUEST['eids'] : $_REQUEST['id']; $exportIds = !empty($_REQUEST['eids']) ? $_REQUEST['eids'] : $_REQUEST['id'];
if ( $exportFile = exportEvents( if ($exportFile = exportEvents(
$exportIds, $exportIds,
(isset($_REQUEST['connkey'])?$_REQUEST['connkey']:''), (isset($_REQUEST['connkey'])?$_REQUEST['connkey']:''),
$exportDetail, $exportDetail,
@ -87,12 +92,13 @@ if ( canView('Events') ) {
$exportMisc, $exportMisc,
$exportFormat, $exportFormat,
$exportCompress, $exportCompress,
false, # structure $exportStructure,
(isset($_REQUEST['exportFile'])?$_REQUEST['exportFile']:''), (!empty($_REQUEST['exportFile'])?$_REQUEST['exportFile']:'zmExport'),
) ) )) {
ajaxResponse(array('exportFile'=>$exportFile)); ajaxResponse(array('exportFile'=>$exportFile));
else } else {
ajaxError('Export Failed'); ajaxError('Export Failed');
}
break; break;
case 'download' : case 'download' :
require_once(ZM_SKIN_PATH.'/includes/export_functions.php'); require_once(ZM_SKIN_PATH.'/includes/export_functions.php');