* (bug 13019) Message cache for some extensions not loaded at time of editing
authorRaimond Spekking <raymond@users.mediawiki.org>
Tue, 4 Mar 2008 17:36:44 +0000 (17:36 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Tue, 4 Mar 2008 17:36:44 +0000 (17:36 +0000)
RELEASE-NOTES
includes/Article.php
includes/EditPage.php

index a7ccbe8..b1b33d7 100644 (file)
@@ -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 ===
 
index f915d01..75c44cc 100644 (file)
@@ -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' );
index 36424ba..33bac6a 100644 (file)
@@ -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 {