r63014 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63013‎ | r63014 | r63015 >
Date:19:41, 26 February 2010
Author:catrope
Status:ok
Tags:
Comment:
wmf-deployment: MFT r63011
Modified paths:
  • /branches/wmf-deployment/includes/api/ApiBase.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/includes/api/ApiBase.php
@@ -493,11 +493,10 @@
494494 public static function getValidNamespaces() {
495495 static $mValidNamespaces = null;
496496 if (is_null($mValidNamespaces)) {
497 -
498 - global $wgContLang;
499 - $mValidNamespaces = array ();
500 - foreach (array_keys($wgContLang->getNamespaces()) as $ns) {
501 - if ($ns >= 0)
 497+ global $wgCanonicalNamespaceNames;
 498+ $mValidNamespaces = array( NS_MAIN ); // Doesn't appear in $wgCanonicalNamespaceNames for some reason
 499+ foreach ( array_keys( $wgCanonicalNamespaceNames ) as $ns ) {
 500+ if ( $ns > 0 ) {
502501 $mValidNamespaces[] = $ns;
503502 }
504503 }
Property changes on: branches/wmf-deployment/includes/api/ApiBase.php
___________________________________________________________________
Name: svn:mergeinfo
505504 + /branches/REL1_15/phase3/includes/api/ApiBase.php:51646
/branches/wmf-deployment/includes/api/ApiBase.php:53381
/trunk/phase3/includes/api/ApiBase.php:56213,56215-56216,56218,56334-56336,56338,56340,56343,56345,56347,56350,57154-57447,57530,57541,57602,57916,58151,58219,58633,58816,60465,60587,60589,60704,61557,62540,62549,63011

Follow-up revisions

RevisionCommit summaryAuthorDate
r63015wmf-deployment: Fix syntax error in r63014catrope19:42, 26 February 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63011API: Don't unstub $wgContLang in ApiBase::getValidNamespaces()catrope18:24, 26 February 2010

Status & tagging log