r102055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102054‎ | r102055 | r102056 >
Date:21:47, 4 November 2011
Author:aaron
Status:ok
Tags:
Comment:
MFT r97815 to fix bug 31627
Modified paths:
  • /branches/wmf/1.18wmf1/includes/Title.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/includes/Title.php
@@ -3880,7 +3880,7 @@
38813881 return $this->mDbkeyform == '';
38823882 case NS_MEDIAWIKI:
38833883 // known system message
3884 - return $this->getDefaultMessageText() !== false;
 3884+ return $this->hasSourceText() !== false;
38853885 default:
38863886 return false;
38873887 }
@@ -3910,8 +3910,13 @@
39113911
39123912 if ( $this->mNamespace == NS_MEDIAWIKI ) {
39133913 // If the page doesn't exist but is a known system message, default
3914 - // message content will be displayed, same for language subpages
3915 - return $this->getDefaultMessageText() !== false;
 3914+ // message content will be displayed, same for language subpages-
 3915+ // Use always content language to avoid loading hundreds of languages
 3916+ // to get the link color.
 3917+ global $wgContLang;
 3918+ list( $name, $lang ) = MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( $this->getText() ) );
 3919+ $message = wfMessage( $name )->inLanguage( $wgContLang )->useDatabase( false );
 3920+ return $message->exists();
39163921 }
39173922
39183923 return false;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97815Don't load all languages just to check whether message is known....nikerabbit14:04, 22 September 2011

Status & tagging log