From: Raimond Spekking Date: Tue, 4 Mar 2008 17:36:44 +0000 (+0000) Subject: * (bug 13019) Message cache for some extensions not loaded at time of editing X-Git-Tag: 1.31.0-rc.0~49257 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=af418ff3febd469633aad3b1ce6e9ecde95e5bf6;p=lhc%2Fweb%2Fwiklou.git * (bug 13019) Message cache for some extensions not loaded at time of editing --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a7ccbe8cfe..b1b33d712c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -62,6 +62,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 12430) Fix call to private method LinkFilter::makeRegex fatal error in maintenance/cleanupSpam.php * All skins should have the "mediawiki" class on the body element +* (bug 13019) Message cache for some extensions not loaded at time of editing === API changes in 1.13 === diff --git a/includes/Article.php b/includes/Article.php index f915d01dca..75c44cc1e1 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -138,7 +138,7 @@ class Article { * @return Return the text of this revision */ function getContent() { - global $wgUser, $wgOut; + global $wgUser, $wgOut, $wgMessageCache; wfProfileIn( __METHOD__ ); @@ -147,6 +147,7 @@ class Article { $wgOut->setRobotpolicy( 'noindex,nofollow' ); if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { + $wgMessageCache->loadAllMessages(); $ret = wfMsgWeirdKey ( $this->mTitle->getText() ) ; } else { $ret = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ); diff --git a/includes/EditPage.php b/includes/EditPage.php index 36424ba9df..33bac6a460 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -105,7 +105,7 @@ class EditPage { * @private */ function getContent( $def_text = '' ) { - global $wgOut, $wgRequest, $wgParser; + global $wgOut, $wgRequest, $wgParser, $wgMessageCache; # Get variables from query string :P $section = $wgRequest->getVal( 'section' ); @@ -118,6 +118,7 @@ class EditPage { $text = ''; if( !$this->mTitle->exists() ) { if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { + $wgMessageCache->loadAllMessages(); # If this is a system message, get the default text. $text = wfMsgWeirdKey ( $this->mTitle->getText() ) ; } else {