Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -130,7 +130,7 @@ |
131 | 131 | $out .= "<table id='mwProtectSet'>"; |
132 | 132 | $out .= "<tbody>"; |
133 | 133 | $out .= "<tr>\n"; |
134 | | - foreach( array_keys($this->mRestrictions) as $action ) { |
| 134 | + foreach( $this->mRestrictions as $action => $required ) { |
135 | 135 | /* Not all languages have V_x <-> N_x relation */ |
136 | 136 | $out .= "<th>" . wfMsgHtml( 'restriction-' . $action ) . "</th>\n"; |
137 | 137 | } |
Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | */ |
74 | 74 | function array_diff_key( $left, $right ) { |
75 | 75 | $result = $left; |
76 | | - foreach ( array_keys($left) as $key ) { |
| 76 | + foreach ( $left as $key => $unused ) { |
77 | 77 | if ( isset( $right[$key] ) ) { |
78 | 78 | unset( $result[$key] ); |
79 | 79 | } |
Index: trunk/phase3/includes/LinkBatch.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | |
99 | 99 | // The remaining links in $data are bad links, register them as such |
100 | 100 | foreach ( $remaining as $ns => $dbkeys ) { |
101 | | - foreach ( array_keys($dbkeys) as $dbkey ) { |
| 101 | + foreach ( $dbkeys as $dbkey => $unused ) { |
102 | 102 | $title = Title::makeTitle( $ns, $dbkey ); |
103 | 103 | $cache->addBadLinkObj( $title ); |
104 | 104 | $ids[$title->getPrefixedDBkey()] = 0; |
— | — | @@ -160,7 +160,7 @@ |
161 | 161 | $sql .= "({$prefix}_namespace=$ns AND {$prefix}_title IN ("; |
162 | 162 | |
163 | 163 | $firstTitle = true; |
164 | | - foreach( array_keys($dbkeys) as $dbkey ) { |
| 164 | + foreach( $dbkeys as $dbkey => $unused ) { |
165 | 165 | if ( $firstTitle ) { |
166 | 166 | $firstTitle = false; |
167 | 167 | } else { |
Index: trunk/phase3/includes/MessageCache.php |
— | — | @@ -313,7 +313,7 @@ |
314 | 314 | # Go through the language array and the extension array and make a note of |
315 | 315 | # any keys missing from the cache |
316 | 316 | $allMessages = Language::getMessagesFor( 'en' ); |
317 | | - foreach ( array_keys($allMessages) as $key ) { |
| 317 | + foreach ( $allMessages as $key => $unused ) { |
318 | 318 | $uckey = $wgLang->ucfirst( $key ); |
319 | 319 | if ( !array_key_exists( $uckey, $this->mCache ) ) { |
320 | 320 | $this->mCache[$uckey] = false; |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | MessageCache::loadAllMessages(); |
326 | 326 | |
327 | 327 | # Add them to the cache |
328 | | - foreach ( array_keys($this->mExtensionMessages) as $key ) { |
| 328 | + foreach ( $this->mExtensionMessages as $key => $unused ) { |
329 | 329 | $uckey = $wgLang->ucfirst( $key ); |
330 | 330 | if ( !array_key_exists( $uckey, $this->mCache ) && |
331 | 331 | ( isset( $this->mExtensionMessages[$key][$wgLang->getCode()] ) || isset( $this->mExtensionMessages[$key]['en'] ) ) ) { |
— | — | @@ -343,7 +343,7 @@ |
344 | 344 | if ( !$this->mKeys ) { |
345 | 345 | $this->mKeys = array(); |
346 | 346 | $allMessages = Language::getMessagesFor( 'en' ); |
347 | | - foreach ( array_keys($allMessages) as $key ) { |
| 347 | + foreach ( $allMessages as $key => $unused ) { |
348 | 348 | $title = $wgContLang->ucfirst( $key ); |
349 | 349 | array_push( $this->mKeys, $title ); |
350 | 350 | } |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -243,7 +243,7 @@ |
244 | 244 | $lb->execute(); |
245 | 245 | |
246 | 246 | $sk =& $wgUser->getSkin(); |
247 | | - foreach ( array_keys($categories) as $category ) { |
| 247 | + foreach ( $categories as $category => $unused ) { |
248 | 248 | $title = Title::makeTitleSafe( NS_CATEGORY, $category ); |
249 | 249 | $text = $wgContLang->convertHtml( $title->getText() ); |
250 | 250 | $this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text ); |
— | — | @@ -1011,7 +1011,7 @@ |
1012 | 1012 | return; |
1013 | 1013 | } |
1014 | 1014 | foreach ( $links2d as $dbkeys ) { |
1015 | | - foreach( array_keys($dbkeys) as $dbkey ) { |
| 1015 | + foreach( $dbkeys as $dbkey => $unused ) { |
1016 | 1016 | $this->addKeyword( $dbkey ); |
1017 | 1017 | if ( ++$count > 10 ) { |
1018 | 1018 | break 2; |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -52,7 +52,7 @@ |
53 | 53 | $pageTouched = $pageSet->getCustomField('page_touched'); |
54 | 54 | $pageLatest = $pageSet->getCustomField('page_latest'); |
55 | 55 | |
56 | | - foreach ( array_keys($titles) as $pageid) { |
| 56 | + foreach ( $titles as $pageid => $unused ) { |
57 | 57 | $pageInfo = array ( |
58 | 58 | 'touched' => wfTimestamp(TS_ISO_8601, $pageTouched[$pageid]), |
59 | 59 | 'lastrevid' => intval($pageLatest[$pageid]) |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -296,7 +296,7 @@ |
297 | 297 | |
298 | 298 | $astriks = str_repeat('*** ', 10); |
299 | 299 | $msg .= "\n\n$astriks Modules $astriks\n\n"; |
300 | | - foreach( array_keys($this->mModules) as $moduleName ) { |
| 300 | + foreach( $this->mModules as $moduleName => $unused ) { |
301 | 301 | $msg .= "* action=$moduleName *"; |
302 | 302 | $module = new $this->mModules[$moduleName] ($this, $moduleName); |
303 | 303 | $msg2 = $module->makeHelpMsg(); |
— | — | @@ -306,7 +306,7 @@ |
307 | 307 | } |
308 | 308 | |
309 | 309 | $msg .= "\n$astriks Formats $astriks\n\n"; |
310 | | - foreach( array_keys($this->mFormats) as $formatName ) { |
| 310 | + foreach( $this->mFormats as $formatName => $unused ) { |
311 | 311 | $msg .= "* format=$formatName *"; |
312 | 312 | $module = $this->createPrinterByName($formatName); |
313 | 313 | $msg2 = $module->makeHelpMsg(); |
— | — | @@ -363,4 +363,4 @@ |
364 | 364 | return "{$this->getCodeString()}: {$this->getMessage()}"; |
365 | 365 | } |
366 | 366 | } |
367 | | -?> |
\ No newline at end of file |
| 367 | +?> |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -382,7 +382,7 @@ |
383 | 383 | if($processTitles) { |
384 | 384 | // The remaining titles in $remaining are non-existant pages |
385 | 385 | foreach ($remaining as $ns => $dbkeys) { |
386 | | - foreach ( array_keys($dbkeys) as $dbkey ) { |
| 386 | + foreach ( $dbkeys as $dbkey => $unused ) { |
387 | 387 | $title = Title :: makeTitle($ns, $dbkey); |
388 | 388 | $this->mMissingTitles[] = $title; |
389 | 389 | $this->mAllPages[$ns][$dbkey] = 0; |
— | — | @@ -595,4 +595,4 @@ |
596 | 596 | return __CLASS__ . ': $Id$'; |
597 | 597 | } |
598 | 598 | } |
599 | | -?> |
\ No newline at end of file |
| 599 | +?> |