function setUserPerm( $perm ) {
// Setting member variables is evil!!!
- if ( !is_array( $perm ) ) {
- $perm = array( $perm );
- }
- for ($i = 0; $i < 100; $i++) {
- $this->user->mRights[$i] = $perm;
+ if ( is_array( $perm ) ) {
+ $this->user->mRights = $perm;
+ } else {
+ $this->user->mRights = array( $perm );
}
-
- // Hack, hack hack ...
- $this->user->mRights['*'] = $perm;
}
function setTitle( $ns, $title = "Main_Page" ) {