Remove all calls to $wgMessageCache->loadAllMessages()
authorPlatonides <platonides@users.mediawiki.org>
Tue, 3 Aug 2010 19:15:43 +0000 (19:15 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Tue, 3 Aug 2010 19:15:43 +0000 (19:15 +0000)
Deprecated and empty since r52503

includes/Article.php
includes/EditPage.php
includes/LogPage.php
includes/RevisionDelete.php
includes/User.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialTags.php
includes/specials/SpecialVersion.php

index f2dcdb6..51b1270 100644 (file)
@@ -260,7 +260,6 @@ class Article {
                        if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
                                # If this is a system message, get the default text.
                                list( $message, $lang ) = $wgMessageCache->figureMessage( $wgContLang->lcfirst( $this->mTitle->getText() ) );
-                               $wgMessageCache->loadAllMessages( $lang );
                                $text = wfMsgGetKey( $message, false, $lang, false );
 
                                if ( wfEmptyMsg( $message, $text ) )
index 24b0ed7..c9b18eb 100644 (file)
@@ -143,7 +143,6 @@ class EditPage {
                        if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
                                # If this is a system message, get the default text.
                                list( $message, $lang ) = $wgMessageCache->figureMessage( $wgContLang->lcfirst( $this->mTitle->getText() ) );
-                               $wgMessageCache->loadAllMessages( $lang );
                                $text = wfMsgGetKey( $message, false, $lang, false );
                                if( wfEmptyMsg( $message, $text ) )
                                        $text = $this->getPreloadedText( $preload );
index be5c08f..54e04a6 100644 (file)
@@ -147,10 +147,9 @@ class LogPage {
         * @return String: log name
         */
        public static function logName( $type ) {
-               global $wgLogNames, $wgMessageCache;
+               global $wgLogNames;
 
                if( isset( $wgLogNames[$type] ) ) {
-                       $wgMessageCache->loadAllMessages();
                        return str_replace( '_', ' ', wfMsg( $wgLogNames[$type] ) );
                } else {
                        // Bogus log types? Perhaps an extension was removed.
@@ -166,8 +165,7 @@ class LogPage {
         * @return String: headertext of this logtype
         */
        public static function logHeader( $type ) {
-               global $wgLogHeaders, $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
+               global $wgLogHeaders;
                return wfMsgExt($wgLogHeaders[$type], array( 'parseinline' ) );
        }
 
@@ -186,9 +184,8 @@ class LogPage {
        public static function actionText( $type, $action, $title = null, $skin = null,
                $params = array(), $filterWikilinks = false ) 
        {
-               global $wgLang, $wgContLang, $wgLogActions, $wgMessageCache;
+               global $wgLang, $wgContLang, $wgLogActions;
 
-               $wgMessageCache->loadAllMessages();
                $key = "$type/$action";
                # Defer patrol log to PatrolLog class
                if( $key == 'patrol/patrol' ) {
index 8dfecc3..4d2957e 100644 (file)
@@ -1302,8 +1302,6 @@ class RevDel_LogList extends RevDel_List {
        var $authorNameField = 'log_user_text';
 
        public function doQuery( $db ) {
-               global $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
                $ids = array_map( 'intval', $this->ids );
                return $db->select( 'logging', '*',
                        array( 'log_id' => $ids ),
index 9c2a078..0ed1716 100644 (file)
@@ -3200,8 +3200,6 @@ class User {
         * @return \string Localized descriptive group name
         */
        static function getGroupName( $group ) {
-               global $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
                $key = "group-$group";
                $name = wfMsg( $key );
                return $name == '' || wfEmptyMsg( $key, $name )
@@ -3216,8 +3214,6 @@ class User {
         * @return \string Localized name for group member
         */
        static function getGroupMember( $group ) {
-               global $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
                $key = "group-$group-member";
                $name = wfMsg( $key );
                return $name == '' || wfEmptyMsg( $key, $name )
@@ -3274,8 +3270,6 @@ class User {
         * @return \types{\type{Title},\bool} Title of the page if it exists, false otherwise
         */
        static function getGroupPage( $group ) {
-               global $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
                $page = wfMsgForContent( 'grouppage-' . $group );
                if( !wfEmptyMsg( 'grouppage-' . $group, $page ) ) {
                        $title = Title::newFromText( $page );
@@ -3488,8 +3482,6 @@ class User {
         * @return \string Localized description of the right
         */
        static function getRightDescription( $right ) {
-               global $wgMessageCache;
-               $wgMessageCache->loadAllMessages();
                $key = "right-$right";
                $name = wfMsg( $key );
                return $name == '' || wfEmptyMsg( $key, $name )
index 12ba2df..411e315 100644 (file)
@@ -41,10 +41,9 @@ class SpecialListGroupRights extends SpecialPage {
         * Show the special page
         */
        public function execute( $par ) {
-               global $wgOut, $wgImplicitGroups, $wgMessageCache;
+               global $wgOut, $wgImplicitGroups;
                global $wgGroupPermissions, $wgRevokePermissions, $wgAddGroups, $wgRemoveGroups;
                global $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf;
-               $wgMessageCache->loadAllMessages();
 
                $this->setHeaders();
                $this->outputHeader();
index d1fa426..658ae5c 100644 (file)
@@ -27,9 +27,7 @@ class SpecialTags extends SpecialPage {
        }
 
        function execute( $par ) {
-               global $wgOut, $wgMessageCache;
-
-               $wgMessageCache->loadAllMessages();
+               global $wgOut;
 
                $wgOut->setPageTitle( wfMsg( 'tags-title' ) );
                $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' );
@@ -88,4 +86,4 @@ class SpecialTags extends SpecialPage {
 
                return Xml::tags( 'tr', null, $newRow ) . "\n";
        }
-}
\ No newline at end of file
+}
index 3959f68..fa8a162 100644 (file)
@@ -44,10 +44,8 @@ class SpecialVersion extends SpecialPage {
         * main()
         */
        function execute( $par ) {
-               global $wgOut, $wgMessageCache, $wgSpecialVersionShowHooks, $wgContLang;
+               global $wgOut, $wgSpecialVersionShowHooks, $wgContLang;
                
-               $wgMessageCache->loadAllMessages();
-
                $this->setHeaders();
                $this->outputHeader();
 
@@ -568,4 +566,4 @@ class SpecialVersion extends SpecialPage {
                }
        }
 
-}
\ No newline at end of file
+}