Remove redundant method.
authorJan Schneider <jan@horde.org>
Tue, 9 Feb 2010 23:31:12 +0000 (00:31 +0100)
committerJan Schneider <jan@horde.org>
Wed, 10 Feb 2010 16:31:44 +0000 (17:31 +0100)
kronolith/lib/Geo.php
kronolith/lib/Geo/Sql.php

index 91154a6..e7649e3 100644 (file)
@@ -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
index 246d9cc..2091256 100644 (file)
@@ -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));