https://www.mediawiki.org/wiki/Special:Code/MediaWiki/102055

Revision: 102055
Author:   aaron
Date:     2011-11-04 21:47:07 +0000 (Fri, 04 Nov 2011)
Log Message:
-----------
MFT r97815 to fix bug 31627

Modified Paths:
--------------
    branches/wmf/1.18wmf1/includes/Title.php

Modified: branches/wmf/1.18wmf1/includes/Title.php
===================================================================
--- branches/wmf/1.18wmf1/includes/Title.php    2011-11-04 21:45:40 UTC (rev 
102054)
+++ branches/wmf/1.18wmf1/includes/Title.php    2011-11-04 21:47:07 UTC (rev 
102055)
@@ -3880,7 +3880,7 @@
                                return $this->mDbkeyform == '';
                        case NS_MEDIAWIKI:
                                // known system message
-                               return $this->getDefaultMessageText() !== false;
+                               return $this->hasSourceText() !== false;
                        default:
                                return false;
                }
@@ -3910,8 +3910,13 @@
 
                if ( $this->mNamespace == NS_MEDIAWIKI ) {
                        // If the page doesn't exist but is a known system 
message, default
-                       // message content will be displayed, same for language 
subpages
-                       return $this->getDefaultMessageText() !== false;
+                       // message content will be displayed, same for language 
subpages-
+                       // Use always content language to avoid loading 
hundreds of languages
+                       // to get the link color.
+                       global $wgContLang;
+                       list( $name, $lang ) = 
MessageCache::singleton()->figureMessage( $wgContLang->lcfirst( 
$this->getText() ) );
+                       $message = wfMessage( $name )->inLanguage( $wgContLang 
)->useDatabase( false );
+                       return $message->exists();
                }
 
                return false;


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to