From 59e1c916bd5c730ee09d61d38e30d9064e040c33 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Mon, 2 Oct 2006 16:33:14 +0000 Subject: [PATCH] * (bug 7460) Revert broken patch for bug 7226 which slows down Special:Allmessages by a factor of 16 --- RELEASE-NOTES | 2 ++ includes/SpecialAllmessages.php | 14 ++++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 9e0f6e9eab..13096c98b8 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -249,6 +249,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Add + to $wgLegalTitleChars by default. Some sites may have occasional problems with hard-to-reach pages, but it should be less trouble than "I can't import dumps from Wikipedia" complaints +* (bug 7460) Revert broken patch for bug 7226 which slows down + Special:Allmessages by a factor of 16 == Languages updated == diff --git a/includes/SpecialAllmessages.php b/includes/SpecialAllmessages.php index f5e16cfd0f..6e3f65880a 100644 --- a/includes/SpecialAllmessages.php +++ b/includes/SpecialAllmessages.php @@ -10,7 +10,7 @@ */ function wfSpecialAllmessages() { global $wgOut, $wgRequest, $wgMessageCache, $wgTitle; - global $wgUseDatabaseMessages, $wgLang, $wgContLang; + global $wgUseDatabaseMessages; # The page isn't much use if the MediaWiki namespace is not being used if( !$wgUseDatabaseMessages ) { @@ -32,17 +32,11 @@ function wfSpecialAllmessages() { $first = true; $sortedArray = array_merge( Language::getMessagesFor( 'en' ), $wgMessageCache->getExtensionMessagesFor( 'en' ) ); ksort( $sortedArray ); - $contentCode = $wgContLang->getCode(); - $fallback = Language::getFallbackFor( $wgLang->getCode() ); $messages = array(); $wgMessageCache->disableTransform(); - foreach ( array_keys( $sortedArray ) as $key ) { - if ( $contentCode == $fallback ) { - $messages[$key]['fallbackmsg'] = wfMsgNoDbForContent( $key ); - } else { - $messages[$key]['fallbackmsg'] = wfMsgNoDb( "$key/$fallback" ); - } + foreach ( $sortedArray as $key => $value ) { + $messages[$key]['enmsg'] = $value; $messages[$key]['statmsg'] = wfMsgNoDb( $key ); $messages[$key]['msg'] = wfMsg ( $key ); } @@ -71,7 +65,7 @@ function makePhp($messages) { global $wgLang; $txt = "\n\n\$messages = array(\n"; foreach( $messages as $key => $m ) { - if($wgLang->getCode() != 'en' and $m['msg'] == $m['fallbackmsg'] ) { + if($wgLang->getCode() != 'en' and $m['msg'] == $m['enmsg'] ) { //if (strstr($m['msg'],"\n")) { // $txt.='/* '; // $comment=' */'; -- 2.20.1