From 8a3dcccbdab021575cfb97cdaf48754ee4dcfbcb Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 7 Mar 2011 17:10:22 +0000 Subject: [PATCH] Remove second parameters from wfEmptyMsg() calls 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 | 2 +- includes/HTMLForm.php | 2 +- includes/Skin.php | 4 ++-- includes/User.php | 2 +- includes/api/ApiQueryTags.php | 2 +- includes/specials/SpecialContributions.php | 4 ++-- includes/specials/SpecialDeletedContributions.php | 2 +- includes/specials/SpecialStatistics.php | 4 ++-- skins/MonoBook.php | 2 +- skins/Vector.php | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index d906255d8f..cd6beee51a 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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; diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 5a0fbaed4e..fb78970e04 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -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; } diff --git a/includes/Skin.php b/includes/Skin.php index a7f1482350..731398e908 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -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]; } diff --git a/includes/User.php b/includes/User.php index 892de83304..4a0f2a3a9a 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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; } diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php index bf012dca4d..61b34669db 100644 --- a/includes/api/ApiQueryTags.php +++ b/includes/api/ApiQueryTags.php @@ -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; } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 961f163d25..6e2f36ec91 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -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 .= "

{$explain}

"; } $f .= Xml::closeElement('fieldset' ) . diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 0e2215f47a..bc2a90b309 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -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)" ); diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index 761f0f0203..d043863c52 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -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; diff --git a/skins/MonoBook.php b/skins/MonoBook.php index 18e6b9fd40..018a81030b 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -286,7 +286,7 @@ class MonoBookTemplate extends BaseTemplate { echo ' ' . Html::openElement( 'div', $portletAttribs ); ?> -
+