Fixup fail from r76191. Thanks Nikerabbit
authorSam Reed <reedy@users.mediawiki.org>
Sat, 6 Nov 2010 16:11:19 +0000 (16:11 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 6 Nov 2010 16:11:19 +0000 (16:11 +0000)
includes/api/ApiMain.php
includes/api/ApiPageSet.php
includes/api/ApiParse.php

index 4fcb0b2..9a71aff 100644 (file)
@@ -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();
index 3b1fd59..d13df81 100644 (file)
@@ -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;
index f6edbb0..9a88631 100644 (file)
@@ -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;