From 5042c221b273ffd8c47b28fd02e35f7226a040ee Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Sat, 18 Oct 2008 11:05:41 +0000 Subject: don't deprecate setPermission. it might come in handy. --- BitPermUser.php | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/BitPermUser.php b/BitPermUser.php index ec13bfa..b220b5a 100644 --- a/BitPermUser.php +++ b/BitPermUser.php @@ -1,6 +1,6 @@ - * @version $Revision: 1.68 $ + * @version $Revision: 1.69 $ * @package users * @subpackage BitPermUser */ @@ -737,6 +737,26 @@ class BitPermUser extends BitUser { return ( $ret ); } + /** + * setPermission temporarily set the permission for the active user does NOT store the permission + * + * @param array $pPerm + * @param array $pValue + * @access public + * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure + */ + function setPermission( $pPerm, $pValue = NULL ) { + if( $this->isAdmin() ) { + $this->mPerms[$pPerm] = TRUE; + } elseif( $this->isValid() ) { + if( $pValue == 'y' || $pValue == TRUE ) { + $this->mPerms[$pPerm] = TRUE; + } else { + unset( $this->mPerms[$pPerm] ); + } + } + } + /** * getGroupPermissions * @@ -927,26 +947,6 @@ class BitPermUser extends BitUser { } return $sGroupUsers[$pGroupId]; } - /** - * setPermission temporarily set the permission for the active user does NOT store the permission - * - * @param array $pPerm - * @param array $pValue - * @access public - * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure - */ - function setPermission( $pPerm, $pValue = NULL ) { - deprecated( "This method doesn't seem to be used. Please remove this note if it is actually used." ); - if( $this->isAdmin() ) { - $this->mPerms[$pPerm] = TRUE; - } elseif( $this->isValid() ) { - if( $pValue == 'y' || $pValue == TRUE ) { - $this->mPerms[$pPerm] = TRUE; - } else { - unset( $this->mPerms[$pPerm] ); - } - } - } function changePermissionLevel($perm, $pLevel) { deprecated( "This method doesn't seem to be used. Please remove this note if it is actually used." ); $query = "update `".BIT_DB_PREFIX."users_permissions` set `perm_level` = ? -- cgit v1.3