Fix "ip address or username" when $wgSysopUserBans = false
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 26 Mar 2005 17:02:16 +0000 (17:02 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 26 Mar 2005 17:02:16 +0000 (17:02 +0000)
includes/SpecialBlockip.php
languages/Language.php

index 05defec..a46d70d 100644 (file)
@@ -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' ) );
index 1cbc205..a163362 100644 (file)
@@ -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',