Skip to content

Commit

Permalink
Delete geolocation if deleting events.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh authored and mrubinsk committed Oct 29, 2017
1 parent c0e2303 commit 4cf9e9f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Driver/Sql.php
Expand Up @@ -791,6 +791,8 @@ public function delete($calendar)
*/
protected function _deleteEvent($eventId, $silent = false)
{
global $injector;

/* Fetch the event for later use. */
if ($eventId instanceof Kronolith_Event) {
$event = $eventId;
Expand Down Expand Up @@ -828,6 +830,9 @@ protected function _deleteEvent($eventId, $silent = false)
}
}

/* Delete Geolocation */
$injector->getInstance('Kronolith_Geo')->deleteLocation($eventId);

return $event;
}

Expand Down

0 comments on commit 4cf9e9f

Please sign in to comment.