From 9db0a63cd2e19628bfdf5a6e34fbf34de9204e3d Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 26 Mar 2005 17:02:16 +0000 Subject: [PATCH] Fix "ip address or username" when $wgSysopUserBans = false --- includes/SpecialBlockip.php | 8 ++++++-- languages/Language.php | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 05defec151..a46d70d3ba 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -47,12 +47,16 @@ class IPBlockForm { function showForm( $err ) { global $wgOut, $wgUser, $wgLang, $wgBlockExpiryOptions; - global $wgRequest; + global $wgRequest, $wgSysopUserBans; $wgOut->setPagetitle( htmlspecialchars( wfMsg( 'blockip' ) ) ); $wgOut->addWikiText( htmlspecialchars( wfMsg( 'blockiptext' ) ) ); - $mIpaddress = htmlspecialchars( wfMsg( 'ipaddress' ) ); + if($wgSysopUserBans) { + $mIpaddress = htmlspecialchars( wfMsg( 'ipadressorusername' ) ); + } else { + $mIpaddress = htmlspecialchars( wfMsg( 'ipaddress' ) ); + } $mIpbexpiry = htmlspecialchars( wfMsg( 'ipbexpiry' ) ); $mIpbreason = htmlspecialchars( wfMsg( 'ipbreason' ) ); $mIpbsubmit = htmlspecialchars( wfMsg( 'ipbsubmit' ) ); diff --git a/languages/Language.php b/languages/Language.php index 1cbc205971..a16336261d 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1374,7 +1374,8 @@ This should be done only only to prevent vandalism, and in accordance with [[Project:Policy|policy]]. Fill in a specific reason below (for example, citing particular pages that were vandalized).", -'ipaddress' => 'IP Address/username', +'ipaddress' => 'IP Address', +'ipadressorusername' => 'IP Address or username', 'ipbexpiry' => 'Expiry', 'ipbreason' => 'Reason', 'ipbsubmit' => 'Block this user', -- 2.20.1