From: Alexandre Emsenhuber Date: Tue, 21 Jun 2011 20:05:00 +0000 (+0000) Subject: Simplify checks by using wfMessage() instead of wfEmptyMsg() X-Git-Tag: 1.31.0-rc.0~29374 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=defda67f7181692342b88b9ead0635e235f142b8;p=lhc%2Fweb%2Fwiklou.git Simplify checks by using wfMessage() instead of wfEmptyMsg() --- diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php index 12f3eed297..4ab0c3d11b 100644 --- a/includes/api/ApiQueryTags.php +++ b/includes/api/ApiQueryTags.php @@ -113,9 +113,8 @@ class ApiQueryTags extends ApiQueryBase { } if ( $this->fld_description ) { - $msg = wfMsg( "tag-$tagName-description" ); - $msg = wfEmptyMsg( "tag-$tagName-description" ) ? '' : $msg; - $tag['description'] = $msg; + $msg = wfMessage( "tag-$tagName-description" ); + $tag['description'] = $msg->exists() ? $msg->text() : ''; } if ( $this->fld_hitcount ) {