Remove second parameters from wfEmptyMsg() calls
authorAntoine Musso <hashar@users.mediawiki.org>
Mon, 7 Mar 2011 17:10:22 +0000 (17:10 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Mon, 7 Mar 2011 17:10:22 +0000 (17:10 +0000)
The second parameter was removed in r64178 and is now useless.
There is probably no need to backport this in 1.17.

includes/GlobalFunctions.php
includes/HTMLForm.php
includes/Skin.php
includes/User.php
includes/api/ApiQueryTags.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialStatistics.php
skins/MonoBook.php
skins/Vector.php

index d906255..cd6beee 100644 (file)
@@ -628,7 +628,7 @@ function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform
  */
 function wfMsgWeirdKey( $key ) {
        $source = wfMsgGetKey( $key, false, true, false );
-       if ( wfEmptyMsg( $key, $source ) ) {
+       if ( wfEmptyMsg( $key ) ) {
                return '';
        } else {
                return $source;
index 5a0fbae..fb78970 100644 (file)
@@ -920,7 +920,7 @@ abstract class HTMLFormField {
                if ( isset( $this->mParams['help-message'] ) ) {
                        $msg = $this->mParams['help-message'];
                        $helptext = wfMsgExt( $msg, 'parseinline' );
-                       if ( wfEmptyMsg( $msg, $helptext ) ) {
+                       if ( wfEmptyMsg( $msg ) ) {
                                # Never mind
                                $helptext = null;
                        }
index a7f1482..731398e 100644 (file)
@@ -1424,11 +1424,11 @@ abstract class Skin extends Linker {
 
                                        $text = wfMsgExt( $line[1], 'parsemag' );
 
-                                       if ( wfEmptyMsg( $line[1], $text ) ) {
+                                       if ( wfEmptyMsg( $line[1] ) ) {
                                                $text = $line[1];
                                        }
 
-                                       if ( wfEmptyMsg( $line[0], $link ) ) {
+                                       if ( wfEmptyMsg( $line[0] ) ) {
                                                $link = $line[0];
                                        }
 
index 892de83..4a0f2a3 100644 (file)
@@ -3518,7 +3518,7 @@ class User {
        static function getRightDescription( $right ) {
                $key = "right-$right";
                $name = wfMsg( $key );
-               return $name == '' || wfEmptyMsg( $key, $name )
+               return $name == '' || wfEmptyMsg( $key )
                        ? $right
                        : $name;
        }
index bf012dc..61b3466 100644 (file)
@@ -116,7 +116,7 @@ class ApiQueryTags extends ApiQueryBase {
 
                if ( $this->fld_description ) {
                        $msg = wfMsg( "tag-$tagName-description" );
-                       $msg = wfEmptyMsg( "tag-$tagName-description", $msg ) ? '' : $msg;
+                       $msg = wfEmptyMsg( "tag-$tagName-description" ) ? '' : $msg;
                        $tag['description'] = $msg;
                }
 
index 961f163..6e2f36e 100644 (file)
@@ -225,7 +225,7 @@ class SpecialContributions extends SpecialPage {
                // languages that want to put the "for" bit right after $user but before
                // $links.  If 'contribsub' is around, use it for reverse compatibility,
                // otherwise use 'contribsub2'.
-               if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
+               if( wfEmptyMsg( 'contribsub' ) ) {
                        return wfMsgHtml( 'contribsub2', $user, $links );
                } else {
                        return wfMsgHtml( 'contribsub', "$user ($links)" );
@@ -397,7 +397,7 @@ class SpecialContributions extends SpecialPage {
                                Xml::submitButton( wfMsg( 'sp-contributions-submit' ) )
                        ) . ' ';        
                $explain = wfMsgExt( 'sp-contributions-explain', 'parseinline' );
-               if( !wfEmptyMsg( 'sp-contributions-explain', $explain ) ) {
+               if( !wfEmptyMsg( 'sp-contributions-explain' ) ) {
                        $f .= "<p id='mw-sp-contributions-explain'>{$explain}</p>";
                }
                $f .= Xml::closeElement('fieldset' ) .
index 0e2215f..bc2a90b 100644 (file)
@@ -453,7 +453,7 @@ class DeletedContributionsPage extends SpecialPage {
                // languages that want to put the "for" bit right after $user but before
                // $links.  If 'contribsub' is around, use it for reverse compatibility,
                // otherwise use 'contribsub2'.
-               if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
+               if( wfEmptyMsg( 'contribsub' ) ) {
                        return wfMsgHtml( 'contribsub2', $user, $links );
                } else {
                        return wfMsgHtml( 'contribsub', "$user ($links)" );
index 761f0f0..d043863 100644 (file)
@@ -198,13 +198,13 @@ class SpecialStatistics extends SpecialPage {
                        }
                        $groupname = htmlspecialchars( $group );
                        $msg = wfMsg( 'group-' . $groupname );
-                       if ( wfEmptyMsg( 'group-' . $groupname, $msg ) || $msg == '' ) {
+                       if ( wfEmptyMsg( 'group-' . $groupname ) || $msg == '' ) {
                                $groupnameLocalized = $groupname;
                        } else {
                                $groupnameLocalized = $msg;
                        }
                        $msg = wfMsgForContent( 'grouppage-' . $groupname );
-                       if ( wfEmptyMsg( 'grouppage-' . $groupname, $msg ) || $msg == '' ) {
+                       if ( wfEmptyMsg( 'grouppage-' . $groupname ) || $msg == '' ) {
                                $grouppageLocalized = MWNamespace::getCanonicalName( NS_PROJECT ) . ':' . $groupname;
                        } else {
                                $grouppageLocalized = $msg;
index 18e6b9f..018a810 100644 (file)
@@ -286,7 +286,7 @@ class MonoBookTemplate extends BaseTemplate {
                echo '  ' . Html::openElement( 'div', $portletAttribs );
 ?>
 
-               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
+               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
                <div class='pBody'>
 <?php   if ( is_array( $cont ) ) { ?>
                        <ul>
index 508e785..3c30ce4 100644 (file)
@@ -278,7 +278,7 @@ class VectorTemplate extends BaseTemplate {
                }
                ?>
 <div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
-       <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg, $out ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
        <div class="body">
 <?php
                if ( is_array( $content ) ): ?>