r90542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90541‎ | r90542 | r90543 >
Date:20:05, 21 June 2011
Author:ialex
Status:ok
Tags:
Comment:
Simplify checks by using wfMessage() instead of wfEmptyMsg()
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryTags.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryTags.php
@@ -113,9 +113,8 @@
114114 }
115115
116116 if ( $this->fld_description ) {
117 - $msg = wfMsg( "tag-$tagName-description" );
118 - $msg = wfEmptyMsg( "tag-$tagName-description" ) ? '' : $msg;
119 - $tag['description'] = $msg;
 117+ $msg = wfMessage( "tag-$tagName-description" );
 118+ $tag['description'] = $msg->exists() ? $msg->text() : '';
120119 }
121120
122121 if ( $this->fld_hitcount ) {

Status & tagging log