From: Jan Schneider Date: Tue, 9 Feb 2010 23:31:12 +0000 (+0100) Subject: Remove redundant method. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=54a633f162962487914154138a6c618fd16be3f8;p=horde.git Remove redundant method. --- diff --git a/kronolith/lib/Geo.php b/kronolith/lib/Geo.php index 91154a69c..e7649e316 100644 --- a/kronolith/lib/Geo.php +++ b/kronolith/lib/Geo.php @@ -42,24 +42,8 @@ abstract class Kronolith_Geo return $driver; } - /** - * Delete an entry from storage - * - * @param string $event_id - * - * @return void - */ - public function deleteLocation($event_id) - { - $sql = "DELETE FROM kronolith_events_geo WHERE event_id = '" . $event_id . "'"; - $result = $this->_write_db->query($sql); - if ($result instanceof PEAR_Error) { - throw new Horde_Exception($result->getMessage()); - } - } - abstract public function setLocation($event_id, $point); abstract public function getLocation($event_id); - abstract public function removeLocation($event_id); + abstract public function deleteLocation($event_id); abstract public function search($criteria); } \ No newline at end of file diff --git a/kronolith/lib/Geo/Sql.php b/kronolith/lib/Geo/Sql.php index 246d9cc7e..2091256b4 100644 --- a/kronolith/lib/Geo/Sql.php +++ b/kronolith/lib/Geo/Sql.php @@ -157,10 +157,15 @@ class Kronolith_Geo_Sql extends Kronolith_Geo } /** + * Deletes an entry from storage * * @see kronolith/lib/Driver/Kronolith_Driver_Geo#removeLocation($event_id) + * + * @param string $event_id + * + * @throws Kronolith_Exception */ - public function removeLocation($event_id) + public function deleteLocation($event_id) { $sql = 'DELETE FROM kronolith_events_geo WHERE event_id = ?'; $this->_write_db->query($sql, array($event_id));