http://www.mediawiki.org/wiki/Special:Code/MediaWiki/70401

Revision: 70401
Author:   platonides
Date:     2010-08-03 19:15:43 +0000 (Tue, 03 Aug 2010)

Log Message:
-----------
Remove all calls to $wgMessageCache->loadAllMessages()
Deprecated and empty since r52503

Modified Paths:
--------------
    trunk/phase3/includes/Article.php
    trunk/phase3/includes/EditPage.php
    trunk/phase3/includes/LogPage.php
    trunk/phase3/includes/RevisionDelete.php
    trunk/phase3/includes/User.php
    trunk/phase3/includes/specials/SpecialListgrouprights.php
    trunk/phase3/includes/specials/SpecialTags.php
    trunk/phase3/includes/specials/SpecialVersion.php

Modified: trunk/phase3/includes/Article.php
===================================================================
--- trunk/phase3/includes/Article.php   2010-08-03 19:15:23 UTC (rev 70400)
+++ trunk/phase3/includes/Article.php   2010-08-03 19:15:43 UTC (rev 70401)
@@ -260,7 +260,6 @@
                        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 ) )

Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php  2010-08-03 19:15:23 UTC (rev 70400)
+++ trunk/phase3/includes/EditPage.php  2010-08-03 19:15:43 UTC (rev 70401)
@@ -143,7 +143,6 @@
                        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 );

Modified: trunk/phase3/includes/LogPage.php
===================================================================
--- trunk/phase3/includes/LogPage.php   2010-08-03 19:15:23 UTC (rev 70400)
+++ trunk/phase3/includes/LogPage.php   2010-08-03 19:15:43 UTC (rev 70401)
@@ -147,10 +147,9 @@
         * @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 @@
         * @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 @@
        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' ) {

Modified: trunk/phase3/includes/RevisionDelete.php
===================================================================
--- trunk/phase3/includes/RevisionDelete.php    2010-08-03 19:15:23 UTC (rev 
70400)
+++ trunk/phase3/includes/RevisionDelete.php    2010-08-03 19:15:43 UTC (rev 
70401)
@@ -1302,8 +1302,6 @@
        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 ),

Modified: trunk/phase3/includes/User.php
===================================================================
--- trunk/phase3/includes/User.php      2010-08-03 19:15:23 UTC (rev 70400)
+++ trunk/phase3/includes/User.php      2010-08-03 19:15:43 UTC (rev 70401)
@@ -3200,8 +3200,6 @@
         * @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 @@
         * @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 @@
         * @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 @@
         * @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 )

Modified: trunk/phase3/includes/specials/SpecialListgrouprights.php
===================================================================
--- trunk/phase3/includes/specials/SpecialListgrouprights.php   2010-08-03 
19:15:23 UTC (rev 70400)
+++ trunk/phase3/includes/specials/SpecialListgrouprights.php   2010-08-03 
19:15:43 UTC (rev 70401)
@@ -41,10 +41,9 @@
         * 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();

Modified: trunk/phase3/includes/specials/SpecialTags.php
===================================================================
--- trunk/phase3/includes/specials/SpecialTags.php      2010-08-03 19:15:23 UTC 
(rev 70400)
+++ trunk/phase3/includes/specials/SpecialTags.php      2010-08-03 19:15:43 UTC 
(rev 70401)
@@ -27,10 +27,8 @@
        }
 
        function execute( $par ) {
-               global $wgOut, $wgMessageCache;
+               global $wgOut;
 
-               $wgMessageCache->loadAllMessages();
-
                $wgOut->setPageTitle( wfMsg( 'tags-title' ) );
                $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 
'tags-intro' );
 
@@ -88,4 +86,4 @@
 
                return Xml::tags( 'tr', null, $newRow ) . "\n";
        }
-}
\ No newline at end of file
+}

Modified: trunk/phase3/includes/specials/SpecialVersion.php
===================================================================
--- trunk/phase3/includes/specials/SpecialVersion.php   2010-08-03 19:15:23 UTC 
(rev 70400)
+++ trunk/phase3/includes/specials/SpecialVersion.php   2010-08-03 19:15:43 UTC 
(rev 70401)
@@ -44,10 +44,8 @@
         * main()
         */
        function execute( $par ) {
-               global $wgOut, $wgMessageCache, $wgSpecialVersionShowHooks, 
$wgContLang;
+               global $wgOut, $wgSpecialVersionShowHooks, $wgContLang;
                
-               $wgMessageCache->loadAllMessages();
-
                $this->setHeaders();
                $this->outputHeader();
 
@@ -568,4 +566,4 @@
                }
        }
 
-}
\ No newline at end of file
+}



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to