r76196 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76195‎ | r76196 | r76197 >
Date:16:11, 6 November 2010
Author:reedy
Status:ok
Tags:
Comment:
Fixup fail from r76191. Thanks Nikerabbit
Modified paths:
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)
  • /trunk/phase3/includes/api/ApiPageSet.php (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -345,7 +345,7 @@
346346 private function formatIWLinks( $iw ) {
347347 $result = array();
348348 foreach ( $iw as $prefix => $titles ) {
349 - foreach ( $titles as $title ) {
 349+ foreach ( array_keys( $titles ) as $title ) {
350350 $entry = array();
351351 $entry['prefix'] = $prefix;
352352
Index: trunk/phase3/includes/api/ApiMain.php
@@ -833,7 +833,7 @@
834834
835835 $astriks = str_repeat( '*** ', 10 );
836836 $msg .= "\n\n$astriks Modules $astriks\n\n";
837 - foreach ( $this->mModules as $moduleName ) {
 837+ foreach ( array_keys( $this->mModules ) as $moduleName ) {
838838 $module = new $this->mModules[$moduleName] ( $this, $moduleName );
839839 $msg .= self::makeHelpMsgHeader( $module, 'action' );
840840 $msg2 = $module->makeHelpMsg();
@@ -852,7 +852,7 @@
853853 }
854854
855855 $msg .= "\n$astriks Formats $astriks\n\n";
856 - foreach ( $this->mFormats as $formatName ) {
 856+ foreach ( array_keys( $this->mFormats ) as $formatName ) {
857857 $module = $this->createPrinterByName( $formatName );
858858 $msg .= self::makeHelpMsgHeader( $module, 'format' );
859859 $msg2 = $module->makeHelpMsg();
Index: trunk/phase3/includes/api/ApiPageSet.php
@@ -501,7 +501,7 @@
502502 if ( $processTitles ) {
503503 // The remaining titles in $remaining are non-existent pages
504504 foreach ( $remaining as $ns => $dbkeys ) {
505 - foreach ( $dbkeys as $dbkey ) {
 505+ foreach ( array_keys( $dbkeys ) as $dbkey ) {
506506 $title = Title::makeTitle( $ns, $dbkey );
507507 $this->mAllPages[$ns][$dbkey] = $this->mFakePageId;
508508 $this->mMissingTitles[$this->mFakePageId] = $title;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76191Add missing credits from r75975...reedy15:10, 6 November 2010

Status & tagging log