*/
function array_diff_key( $left, $right ) {
$result = $left;
- foreach ( array_keys($left) as $key ) {
+ foreach ( $left as $key => $unused ) {
if ( isset( $right[$key] ) ) {
unset( $result[$key] );
}
// The remaining links in $data are bad links, register them as such
foreach ( $remaining as $ns => $dbkeys ) {
- foreach ( array_keys($dbkeys) as $dbkey ) {
+ foreach ( $dbkeys as $dbkey => $unused ) {
$title = Title::makeTitle( $ns, $dbkey );
$cache->addBadLinkObj( $title );
$ids[$title->getPrefixedDBkey()] = 0;
$sql .= "({$prefix}_namespace=$ns AND {$prefix}_title IN (";
$firstTitle = true;
- foreach( array_keys($dbkeys) as $dbkey ) {
+ foreach( $dbkeys as $dbkey => $unused ) {
if ( $firstTitle ) {
$firstTitle = false;
} else {
# Go through the language array and the extension array and make a note of
# any keys missing from the cache
$allMessages = Language::getMessagesFor( 'en' );
- foreach ( array_keys($allMessages) as $key ) {
+ foreach ( $allMessages as $key => $unused ) {
$uckey = $wgLang->ucfirst( $key );
if ( !array_key_exists( $uckey, $this->mCache ) ) {
$this->mCache[$uckey] = false;
MessageCache::loadAllMessages();
# Add them to the cache
- foreach ( array_keys($this->mExtensionMessages) as $key ) {
+ foreach ( $this->mExtensionMessages as $key => $unused ) {
$uckey = $wgLang->ucfirst( $key );
if ( !array_key_exists( $uckey, $this->mCache ) &&
( isset( $this->mExtensionMessages[$key][$wgLang->getCode()] ) || isset( $this->mExtensionMessages[$key]['en'] ) ) ) {
if ( !$this->mKeys ) {
$this->mKeys = array();
$allMessages = Language::getMessagesFor( 'en' );
- foreach ( array_keys($allMessages) as $key ) {
+ foreach ( $allMessages as $key => $unused ) {
$title = $wgContLang->ucfirst( $key );
array_push( $this->mKeys, $title );
}
$lb->execute();
$sk =& $wgUser->getSkin();
- foreach ( array_keys($categories) as $category ) {
+ foreach ( $categories as $category => $unused ) {
$title = Title::makeTitleSafe( NS_CATEGORY, $category );
$text = $wgContLang->convertHtml( $title->getText() );
$this->mCategoryLinks[] = $sk->makeLinkObj( $title, $text );
return;
}
foreach ( $links2d as $dbkeys ) {
- foreach( array_keys($dbkeys) as $dbkey ) {
+ foreach( $dbkeys as $dbkey => $unused ) {
$this->addKeyword( $dbkey );
if ( ++$count > 10 ) {
break 2;
$out .= "<table id='mwProtectSet'>";
$out .= "<tbody>";
$out .= "<tr>\n";
- foreach( array_keys($this->mRestrictions) as $action ) {
+ foreach( $this->mRestrictions as $action => $required ) {
/* Not all languages have V_x <-> N_x relation */
$out .= "<th>" . wfMsgHtml( 'restriction-' . $action ) . "</th>\n";
}
$astriks = str_repeat('*** ', 10);
$msg .= "\n\n$astriks Modules $astriks\n\n";
- foreach( array_keys($this->mModules) as $moduleName ) {
+ foreach( $this->mModules as $moduleName => $unused ) {
$msg .= "* action=$moduleName *";
$module = new $this->mModules[$moduleName] ($this, $moduleName);
$msg2 = $module->makeHelpMsg();
}
$msg .= "\n$astriks Formats $astriks\n\n";
- foreach( array_keys($this->mFormats) as $formatName ) {
+ foreach( $this->mFormats as $formatName => $unused ) {
$msg .= "* format=$formatName *";
$module = $this->createPrinterByName($formatName);
$msg2 = $module->makeHelpMsg();
return "{$this->getCodeString()}: {$this->getMessage()}";
}
}
-?>
\ No newline at end of file
+?>
if($processTitles) {
// The remaining titles in $remaining are non-existant pages
foreach ($remaining as $ns => $dbkeys) {
- foreach ( array_keys($dbkeys) as $dbkey ) {
+ foreach ( $dbkeys as $dbkey => $unused ) {
$title = Title :: makeTitle($ns, $dbkey);
$this->mMissingTitles[] = $title;
$this->mAllPages[$ns][$dbkey] = 0;
return __CLASS__ . ': $Id$';
}
}
-?>
\ No newline at end of file
+?>
$pageTouched = $pageSet->getCustomField('page_touched');
$pageLatest = $pageSet->getCustomField('page_latest');
- foreach ( array_keys($titles) as $pageid) {
+ foreach ( $titles as $pageid => $unused ) {
$pageInfo = array (
'touched' => wfTimestamp(TS_ISO_8601, $pageTouched[$pageid]),
'lastrevid' => intval($pageLatest[$pageid])