*Make entry point for hideuser aspect of blocks (requires 'hideuser' right). Still...
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 23 Nov 2007 22:03:12 +0000 (22:03 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 23 Nov 2007 22:03:12 +0000 (22:03 +0000)
includes/SpecialBlockip.php
skins/common/block.js

index 92195b8..e93f6f6 100644 (file)
@@ -227,34 +227,35 @@ class IPBlockForm {
                        </td>
                </tr>
                ");
-               // Allow some users to hide name from block log, blocklist and listusers
-               if ( $wgUser->isAllowed( 'hideuser' ) ) {
+               
+               global $wgSysopEmailBans;
+               if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
                        $wgOut->addHTML("
-                       <tr>
+                       <tr id='wpEnableEmailBan'>
                        <td>&nbsp;</td>
                                <td>
-                                       " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ),
-                                                       'wpHideName', 'wpHideName', $this->BlockHideName,
-                                                               array( 'tabindex' => '9' ) ) . "
+                                       " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ),
+                                                       'wpEmailBan', 'wpEmailBan', $this->BlockEmail,
+                                                               array( 'tabindex' => '10' )) . "
                                </td>
                        </tr>
                        ");
                }
 
-               global $wgSysopEmailBans;
-
-               if ( $wgSysopEmailBans && $wgUser->isAllowed( 'blockemail' ) ) {
+               // Allow some users to hide name from block log, blocklist and listusers
+               if ( $wgUser->isAllowed( 'hideuser' ) ) {
                        $wgOut->addHTML("
-                       <tr id='wpEnableEmailBan'>
+                       <tr id='wpEnableHideUser'>
                        <td>&nbsp;</td>
                                <td>
-                                       " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ),
-                                                       'wpEmailBan', 'wpEmailBan', $this->BlockEmail,
-                                                               array( 'tabindex' => '10' )) . "
+                                       " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ),
+                                                       'wpHideName', 'wpHideName', $this->BlockHideName,
+                                                               array( 'tabindex' => '9' ) ) . "
                                </td>
                        </tr>
                        ");
                }
+               
                $wgOut->addHTML("
                <tr>
                        <td style='padding-top: 1em'>&nbsp;</td>
index 430c1d5..741dd76 100644 (file)
@@ -50,4 +50,7 @@ function updateBlockOptions() {
 
        var emailblockRow = document.getElementById('wpEnableEmailBan');
        emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       
+       var emailblockRow = document.getElementById('wpEnableHideUser');
+       emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
 }