From bcdac0104f660c078fc172bea75f8a3800c46544 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 6 Feb 2015 11:50:07 -0500 Subject: [PATCH] pass a minimum event hash instead of the event id to deleteEvent --- web/includes/actions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/web/includes/actions.php b/web/includes/actions.php index c2d32f344..5c61a6322 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -574,9 +574,10 @@ if ( !empty($action) ) // well time out before completing, in which case zmaudit will still tidy up if ( !ZM_OPT_FAST_DELETE ) { - $markEids = dbFetchAll( "select Id from Events where MonitorId=?", 'Id', array($markMid) ); + // Slight hack, we maybe should load *, but we happen to know that the deleteEvent function uses Id and StartTime. + $markEids = dbFetchAll( "SELECT Id,StartTime FROM Events WHERE MonitorId=?", NULL, array($markMid) ); foreach( $markEids as $markEid ) - deleteEvent( $markEid ); + deleteEvent( $markEid, $markMid ); deletePath( ZM_DIR_EVENTS."/".basename($monitor['Name']) ); deletePath( ZM_DIR_EVENTS."/".$monitor['Id'] ); // I'm trusting the Id.