r94454 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94453‎ | r94454 | r94455 >
Date:13:12, 14 August 2011
Author:robin
Status:ok
Tags:
Comment:
check for the right namespaces, so it doesn't give php notices on non-testwiki namespaces
Modified paths:
  • /trunk/extensions/WikimediaIncubator/IncubatorTest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php
@@ -458,11 +458,15 @@
459459 * @return True
460460 */
461461 static function onShowMissingArticle( $article ) {
462 - global $wgOut;
 462+ global $wgOut, $wmincTestWikiNamespaces;
463463 $title = $article->getTitle();
464464 $prefix = self::analyzePrefix( $title->getText(),
465465 true /* only info pages */, true /* allow sister projects */ );
466466
 467+ if( !in_array( $title->getNamespace(), $wmincTestWikiNamespaces ) ) {
 468+ return true;
 469+ }
 470+
467471 if( $prefix['error'] ) { # We are not on info pages
468472 global $wmincSisterProjects;
469473 $prefix2 = self::analyzePrefix( $title->getText(), false, true );

Status & tagging log