From: Michael J. Rubinsky Date: Sat, 22 Jan 2011 06:02:22 +0000 (-0500) Subject: Horde_Share_Datatree needs _idExists() also. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=395096f89aabc4fb7e9e76f2287e0dabe70108af;p=horde.git Horde_Share_Datatree needs _idExists() also. Probably a more effecient way to check this, but this driver is deprecated. This is just to satisfy implementing the abstract method. --- diff --git a/framework/Share/lib/Horde/Share/Datatree.php b/framework/Share/lib/Horde/Share/Datatree.php index e6ce04034..1264fcbfb 100644 --- a/framework/Share/lib/Horde/Share/Datatree.php +++ b/framework/Share/lib/Horde/Share/Datatree.php @@ -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 * diff --git a/framework/Share/lib/Horde/Share/Sql.php b/framework/Share/lib/Horde/Share/Sql.php index 3d1284676..866cabfd3 100644 --- a/framework/Share/lib/Horde/Share/Sql.php +++ b/framework/Share/lib/Horde/Share/Sql.php @@ -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 {