Do not allow the deleting of Archived Events

pull/3034/head
Isaac Connor 2020-09-03 17:02:48 -04:00
parent 94c7708df5
commit c934dee233
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ class Event extends ZM_Object {
Error('Event delete on event with empty Id');
return;
}
if ( $this->{'Archived'} ) {
Error('Cannot delete an Archived event.');
return;
}
if ( ZM_OPT_FAST_DELETE ) {
dbQuery('DELETE FROM Events WHERE Id = ?', array($this->{'Id'}));
return;