1
0
Fork 0

Delete event when the item is deleted

This commit is contained in:
Michael Vogel 2015-10-17 01:25:25 +02:00
commit 7f9711ffe6
2 changed files with 16 additions and 0 deletions

View file

@ -204,7 +204,13 @@ function ev_compare($a,$b) {
return strcmp($date_a,$date_b);
}
function event_delete($event_id) {
if ($event_id == 0)
return;
q("DELETE FROM `event` WHERE `id` = %d", intval($event_id));
logger("Deleted event ".$event_id, LOGGER_DEBUG);
}
function event_store($arr) {