From: Alexandre Emsenhuber Date: Sun, 22 May 2011 08:41:24 +0000 (+0000) Subject: Simplify a bit message existence checks, and also check existence of grouppage-*... X-Git-Tag: 1.31.0-rc.0~30015 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=3fae761beea2544d8210956cee624e75135c2bc6;p=lhc%2Fweb%2Fwiklou.git Simplify a bit message existence checks, and also check existence of grouppage-* messages in content language --- 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(