From: Niklas Laxström Date: Wed, 28 Nov 2007 15:09:36 +0000 (+0000) Subject: * Optimization in Title::isAlwaysKnown X-Git-Tag: 1.31.0-rc.0~50679 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/operations/?a=commitdiff_plain;h=794d41a31cefb839c7b5e0c214333218a83b27bc;p=lhc%2Fweb%2Fwiklou.git * Optimization in Title::isAlwaysKnown --- diff --git a/includes/Title.php b/includes/Title.php index e3c4c941d5..567e18acaa 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2635,9 +2635,15 @@ class Title { * @return bool */ public function isAlwaysKnown() { + // If the page is form Mediawiki:message/lang, calling wfMsgWeirdKey causes + // the full l10n of that language to be loaded. That takes much memory and + // isn't needed. So we strip the language part away. + // Also, extension messages which are not loaded, are shown as red, because + // we don't call MessageCache::loadAllMessages. + list( $basename, /* rest */ ) = explode( '/', $this->mDbkeyform, 2 ); return $this->isExternal() || ( $this->mNamespace == NS_MAIN && $this->mDbkeyform == '' ) - || ( $this->mNamespace == NS_MEDIAWIKI && wfMsgWeirdKey( $this->mDbkeyform ) ); + || ( $this->mNamespace == NS_MEDIAWIKI && wfMsgWeirdKey( $basename ) ); } /**