Horde_Share_Datatree needs _idExists() also.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 22 Jan 2011 06:02:22 +0000 (01:02 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 22 Jan 2011 06:03:49 +0000 (01:03 -0500)
Probably a more effecient way to check this, but this driver is
deprecated. This is just to satisfy implementing the abstract method.

framework/Share/lib/Horde/Share/Datatree.php
framework/Share/lib/Horde/Share/Sql.php

index e6ce040..1264fcb 100644 (file)
@@ -254,6 +254,23 @@ class Horde_Share_Datatree extends Horde_Share_Base
     }
 
     /**
+     * Check that a share id exists in the system.
+     *
+     * @param integer $id  The share id
+     *
+     * @return boolean True if the share exists.
+     */
+    protected function _idExists($id)
+    {
+        try {
+            $this->_getShareById($id);
+            return true;
+        } catch (Horde_Share_Exception $e) {
+            return false;
+        }
+    }
+
+    /**
      * Returns an array of criteria for querying shares.
      * @access protected
      *
index 3d12846..866cabf 100644 (file)
@@ -703,6 +703,13 @@ class Horde_Share_Sql extends Horde_Share_Base
         }
     }
 
+    /**
+     * Check that a share id exists in the system.
+     *
+     * @param integer $id  The share id
+     *
+     * @return boolean True if the share exists.
+     */
     protected function _idExists($id)
     {
         try {