Index: trunk/phase3/includes/Title.php |
— | — | @@ -1167,17 +1167,12 @@ |
1168 | 1168 | * Determines if $user is unable to edit this page because it has been protected |
1169 | 1169 | * by $wgNamespaceProtection. |
1170 | 1170 | * |
1171 | | - * @param $user User object, $wgUser will be used if not passed |
| 1171 | + * @param $user User object to check permissions |
1172 | 1172 | * @return Bool |
1173 | 1173 | */ |
1174 | | - public function isNamespaceProtected( User $user = null ) { |
| 1174 | + public function isNamespaceProtected( User $user ) { |
1175 | 1175 | global $wgNamespaceProtection; |
1176 | 1176 | |
1177 | | - if ( $user === null ) { |
1178 | | - global $wgUser; |
1179 | | - $user = $wgUser; |
1180 | | - } |
1181 | | - |
1182 | 1177 | if ( isset( $wgNamespaceProtection[$this->mNamespace] ) ) { |
1183 | 1178 | foreach ( (array)$wgNamespaceProtection[$this->mNamespace] as $right ) { |
1184 | 1179 | if ( $right != '' && !$user->isAllowed( $right ) ) { |