From: Jan Schneider Date: Wed, 22 Dec 2010 11:02:43 +0000 (+0100) Subject: Return booleans. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=cb5f5599341a2bf76e83064ce8a52b8012f05831;p=horde.git Return booleans. --- diff --git a/framework/Perms/lib/Horde/Perms.php b/framework/Perms/lib/Horde/Perms.php index 0aad5b754..d8ea366d7 100644 --- a/framework/Perms/lib/Horde/Perms.php +++ b/framework/Perms/lib/Horde/Perms.php @@ -423,7 +423,7 @@ class Horde_Perms */ public function hasPermission($permission, $user, $perm, $creator = null) { - return ($this->getPermissions($permission, $user, $creator) & $perm); + return (bool)($this->getPermissions($permission, $user, $creator) & $perm); } /** @@ -460,7 +460,7 @@ class Horde_Perms ); try { - return $GLOBALS['registry']->callAppMethod($app, 'hasPermission', array('args' => $args)); + return (bool)$GLOBALS['registry']->callAppMethod($app, 'hasPermission', array('args' => $args)); } catch (Horde_Exception $e) {} }