From cc0574856f6c16cde0604b8cfbe2654299f36da7 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sat, 6 Nov 2010 16:11:19 +0000 Subject: [PATCH] Fixup fail from r76191. Thanks Nikerabbit --- includes/api/ApiMain.php | 4 ++-- includes/api/ApiPageSet.php | 2 +- includes/api/ApiParse.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 4fcb0b202e..9a71affad5 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -833,7 +833,7 @@ class ApiMain extends ApiBase { $astriks = str_repeat( '*** ', 10 ); $msg .= "\n\n$astriks Modules $astriks\n\n"; - foreach ( $this->mModules as $moduleName ) { + foreach ( array_keys( $this->mModules ) as $moduleName ) { $module = new $this->mModules[$moduleName] ( $this, $moduleName ); $msg .= self::makeHelpMsgHeader( $module, 'action' ); $msg2 = $module->makeHelpMsg(); @@ -852,7 +852,7 @@ class ApiMain extends ApiBase { } $msg .= "\n$astriks Formats $astriks\n\n"; - foreach ( $this->mFormats as $formatName ) { + foreach ( array_keys( $this->mFormats ) as $formatName ) { $module = $this->createPrinterByName( $formatName ); $msg .= self::makeHelpMsgHeader( $module, 'format' ); $msg2 = $module->makeHelpMsg(); diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php index 3b1fd59829..d13df81be6 100644 --- a/includes/api/ApiPageSet.php +++ b/includes/api/ApiPageSet.php @@ -501,7 +501,7 @@ class ApiPageSet extends ApiQueryBase { if ( $processTitles ) { // The remaining titles in $remaining are non-existent pages foreach ( $remaining as $ns => $dbkeys ) { - foreach ( $dbkeys as $dbkey ) { + foreach ( array_keys( $dbkeys ) as $dbkey ) { $title = Title::makeTitle( $ns, $dbkey ); $this->mAllPages[$ns][$dbkey] = $this->mFakePageId; $this->mMissingTitles[$this->mFakePageId] = $title; diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index f6edbb0373..9a88631411 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -345,7 +345,7 @@ class ApiParse extends ApiBase { private function formatIWLinks( $iw ) { $result = array(); foreach ( $iw as $prefix => $titles ) { - foreach ( $titles as $title ) { + foreach ( array_keys( $titles ) as $title ) { $entry = array(); $entry['prefix'] = $prefix; -- 2.20.1