Index: trunk/phase3/includes/Revision.php |
— | — | @@ -979,9 +979,16 @@ |
980 | 980 | public function userCan( $field ) { |
981 | 981 | if( $this->mDeleted & $field ) { |
982 | 982 | global $wgUser; |
983 | | - $permission = ( $this->mDeleted & self::DELETED_RESTRICTED ) |
984 | | - ? 'suppressrevision' |
985 | | - : ( $field & self::DELETED_TEXT ) ? 'deletedtext' : 'deletedhistory'; |
| 983 | + |
| 984 | + $permission = ''; |
| 985 | + if ( $this->mDeleted & self::DELETED_RESTRICTED ) { |
| 986 | + $permission = 'suppressrevision'; |
| 987 | + } elseif ( $field & self::DELETED_TEXT ) { |
| 988 | + $permission = 'deletedtext'; |
| 989 | + } else { |
| 990 | + $permission = 'deletedhistory'; |
| 991 | + } |
| 992 | + |
986 | 993 | wfDebug( "Checking for $permission due to $field match on $this->mDeleted\n" ); |
987 | 994 | return $wgUser->isAllowed( $permission ); |
988 | 995 | } else { |