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 50326cf80c
commit ad9ce720fd
1 changed files with 12 additions and 6 deletions

View File

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