From 3fae761beea2544d8210956cee624e75135c2bc6 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sun, 22 May 2011 08:41:24 +0000 Subject: [PATCH] Simplify a bit message existence checks, and also check existence of grouppage-* messages in content language --- includes/specials/SpecialStatistics.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index c1d05f2bc2..c9290f601c 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -198,17 +198,17 @@ class SpecialStatistics extends SpecialPage { continue; } $groupname = htmlspecialchars( $group ); - $msg = wfMsg( 'group-' . $groupname ); - if ( wfEmptyMsg( 'group-' . $groupname ) || $msg == '' ) { + $msg = wfMessage( 'group-' . $groupname ); + if ( $msg->isBlank() ) { $groupnameLocalized = $groupname; } else { - $groupnameLocalized = $msg; + $groupnameLocalized = $msg->text(); } - $msg = wfMsgForContent( 'grouppage-' . $groupname ); - if ( wfEmptyMsg( 'grouppage-' . $groupname ) || $msg == '' ) { + $msg = wfMessage( 'grouppage-' . $groupname )->inContentLanguage(); + if ( $msg->isBlank() ) { $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname; } else { - $grouppageLocalized = $msg; + $grouppageLocalized = $msg->text(); } $linkTarget = Title::newFromText( $grouppageLocalized ); $grouppage = $sk->link( -- 2.20.1