r88563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88562‎ | r88563 | r88564 >
Date:08:41, 22 May 2011
Author:ialex
Status:ok
Tags:
Comment:
Simplify a bit message existence checks, and also check existence of grouppage-* messages in content language
Modified paths:
  • /trunk/phase3/includes/specials/SpecialStatistics.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialStatistics.php
@@ -198,17 +198,17 @@
199199 continue;
200200 }
201201 $groupname = htmlspecialchars( $group );
202 - $msg = wfMsg( 'group-' . $groupname );
203 - if ( wfEmptyMsg( 'group-' . $groupname ) || $msg == '' ) {
 202+ $msg = wfMessage( 'group-' . $groupname );
 203+ if ( $msg->isBlank() ) {
204204 $groupnameLocalized = $groupname;
205205 } else {
206 - $groupnameLocalized = $msg;
 206+ $groupnameLocalized = $msg->text();
207207 }
208 - $msg = wfMsgForContent( 'grouppage-' . $groupname );
209 - if ( wfEmptyMsg( 'grouppage-' . $groupname ) || $msg == '' ) {
 208+ $msg = wfMessage( 'grouppage-' . $groupname )->inContentLanguage();
 209+ if ( $msg->isBlank() ) {
210210 $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname;
211211 } else {
212 - $grouppageLocalized = $msg;
 212+ $grouppageLocalized = $msg->text();
213213 }
214214 $linkTarget = Title::newFromText( $grouppageLocalized );
215215 $grouppage = $sk->link(

Status & tagging log