From: Michael J. Rubinsky Date: Mon, 28 Sep 2009 20:29:17 +0000 (-0400) Subject: use class constants here as well X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f5628b4f7e752d6c4b961fb34c5605f2eb8be006;p=horde.git use class constants here as well --- diff --git a/framework/Lock/lib/Horde/Lock.php b/framework/Lock/lib/Horde/Lock.php index c54f45e8e..c3117acc7 100644 --- a/framework/Lock/lib/Horde/Lock.php +++ b/framework/Lock/lib/Horde/Lock.php @@ -103,8 +103,8 @@ class Horde_Lock * to be in URI form. * @param int $lifetime Time (in seconds) for which the lock will be * considered valid. - * @param string exclusive One of HORDE_LOCK_TYPE_SHARED or - * HORDE_LOCK_TYPE_EXCLUSIVE. + * @param string exclusive One of self::TYPE_SHARED or + * self::TYPE_EXCLUSIVE. * - An exclusive lock will be enforced strictly * and must be interpreted to mean that the * resource can not be modified. Only one @@ -123,7 +123,7 @@ class Horde_Lock * @throws Horde_Log_Exception */ public function setLock($requestor, $scope, $principal, - $lifetime = 1, $exclusive = HORDE_LOCK_TYPE_SHARED) + $lifetime = 1, $exclusive = self::TYPE_SHARED) { throw new Horde_Log_Exception(_("No lock driver configured!")); } diff --git a/framework/Lock/lib/Horde/Lock/Sql.php b/framework/Lock/lib/Horde/Lock/Sql.php index 70c774578..62d2f5975 100644 --- a/framework/Lock/lib/Horde/Lock/Sql.php +++ b/framework/Lock/lib/Horde/Lock/Sql.php @@ -240,14 +240,14 @@ class Horde_Lock_Sql extends Horde_Lock * @see Horde_Lock::setLock */ public function setLock($requestor, $scope, $principal, - $lifetime = 1, $type = HORDE_LOCK_TYPE_SHARED) + $lifetime = 1, $type = self::TYPE_SHARED) { if (is_a(($result = $this->_connect()), 'PEAR_Error')) { Horde::logMessage($result, __FILE__, __LINE__, PEAR_LOG_ERR); throw new Horde_Lock_Exception(_("Internal database error. Details have been logged for the administrator.")); } - $oldlocks = $this->getLocks($scope, $principal, HORDE_LOCK_TYPE_EXCLUSIVE); + $oldlocks = $this->getLocks($scope, $principal, self::TYPE_EXCLUSIVE); if (is_a($oldlocks, 'PEAR_Error')) { throw new Horde_Lock_Exception($oldlocks->getMessage()); }