From a9b5c1402cc4ecd5396069be42c80ba34dd4445d Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 3 Aug 2010 19:15:43 +0000 Subject: [PATCH] Remove all calls to $wgMessageCache->loadAllMessages() Deprecated and empty since r52503 --- includes/Article.php | 1 - includes/EditPage.php | 1 - includes/LogPage.php | 9 +++------ includes/RevisionDelete.php | 2 -- includes/User.php | 8 -------- includes/specials/SpecialListgrouprights.php | 3 +-- includes/specials/SpecialTags.php | 6 ++---- includes/specials/SpecialVersion.php | 6 ++---- 8 files changed, 8 insertions(+), 28 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index f2dcdb6d79..51b12702e2 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 ) ) diff --git a/includes/EditPage.php b/includes/EditPage.php index 24b0ed702e..c9b18ebf25 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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 ); diff --git a/includes/LogPage.php b/includes/LogPage.php index be5c08f879..54e04a6f01 100644 --- a/includes/LogPage.php +++ b/includes/LogPage.php @@ -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' ) { diff --git a/includes/RevisionDelete.php b/includes/RevisionDelete.php index 8dfecc3232..4d2957e85b 100644 --- a/includes/RevisionDelete.php +++ b/includes/RevisionDelete.php @@ -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 ), diff --git a/includes/User.php b/includes/User.php index 9c2a078fa2..0ed1716b7d 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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 ) diff --git a/includes/specials/SpecialListgrouprights.php b/includes/specials/SpecialListgrouprights.php index 12ba2dfe38..411e315217 100644 --- a/includes/specials/SpecialListgrouprights.php +++ b/includes/specials/SpecialListgrouprights.php @@ -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(); diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index d1fa426a06..658ae5c9bc 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -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( "
\n$1\n
", 'tags-intro' ); @@ -88,4 +86,4 @@ class SpecialTags extends SpecialPage { return Xml::tags( 'tr', null, $newRow ) . "\n"; } -} \ No newline at end of file +} diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index 3959f68189..fa8a162a2e 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -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 +} -- 2.20.1