Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php |
— | — | @@ -309,8 +309,6 @@ |
310 | 310 | * @return Boolean |
311 | 311 | */ |
312 | 312 | static function onGetUserPermissionsErrors( $title, $user, $action, &$result ) { |
313 | | - $notAllowedActions = in_array( $action, array( 'edit', 'createpage' ) ); |
314 | | - |
315 | 313 | $titletext = $title->getText(); |
316 | 314 | $prefixdata = self::analyzePrefix( $titletext ); |
317 | 315 | |
— | — | @@ -327,7 +325,7 @@ |
328 | 326 | # faking external link to support prot-rel URLs |
329 | 327 | $link = "[$link ". self::makeExternalLinkText( $link ) . "]"; |
330 | 328 | $result[] = array( 'wminc-error-wiki-exists', $link ); |
331 | | - return $notAllowedActions ? false : true; |
| 329 | + return $action != 'edit'; |
332 | 330 | } |
333 | 331 | |
334 | 332 | if( !self::shouldWeShowUnprefixedError( $title ) || $action != 'create' ) { |
— | — | @@ -346,7 +344,7 @@ |
347 | 345 | $error = 'wminc-error-unprefixed'; |
348 | 346 | } |
349 | 347 | $result = $error; |
350 | | - return $notAllowedActions ? false : true; |
| 348 | + return $action != 'edit'; |
351 | 349 | } |
352 | 350 | |
353 | 351 | /** |