Apply validCardinal to all eids. Remove dead delete code

pull/3812/head
Isaac Connor 2024-01-27 18:33:19 -05:00
parent 7493230e03
commit 648bd77b21
1 changed files with 2 additions and 7 deletions

View File

@ -37,11 +37,6 @@ if ( canView('Events') or canView('Snapshots') ) {
}
$ok = true;
break;
case 'deleteVideo' :
unlink($videoFiles[$_REQUEST['id']]);
unset($videoFiles[$_REQUEST['id']]);
ajaxResponse();
break;
case 'export' :
require_once(ZM_SKIN_PATH.'/includes/export_functions.php');
@ -91,7 +86,7 @@ if ( canView('Events') or canView('Snapshots') ) {
session_write_close();
$exportIds = !empty($_REQUEST['eids']) ? $_REQUEST['eids'] : $_REQUEST['id'];
$exportIds = !empty($_REQUEST['eids']) ? array_map(function($eid) {return validCardinal($eid);}, $_REQUEST['eids']) : validCardinal($_REQUEST['id']);
if ($exportFile = exportEvents(
$exportIds,
(isset($_REQUEST['connkey'])?$_REQUEST['connkey']:''),
@ -118,7 +113,7 @@ if ( canView('Events') or canView('Snapshots') ) {
if (!$exportFileName) $exportFileName = 'Export'.(isset($_REQUEST['connkey'])?$_REQUEST['connkey']:'');
$exportFileName = preg_replace('/[^\w\-\.\(\):]+/', '', $exportFileName);
$exportIds = !empty($_REQUEST['eids']) ? $_REQUEST['eids'] : (isset($_REQUEST['id']) ? [$_REQUEST['id']] : []);
$exportIds = !empty($_REQUEST['eids']) ? array_map(function($eid) {return validCardinal($eid);}, $_REQUEST['eids']) : validCardinal($_REQUEST['id']);
ZM\Debug("Export IDS". print_r($exportIds, true));
$filter = isset($_REQUEST['filter']) ? ZM\Filter::parse($_REQUEST['filter']) : null;