From: Aaron Schulz Date: Fri, 23 Nov 2007 22:03:12 +0000 (+0000) Subject: *Make entry point for hideuser aspect of blocks (requires 'hideuser' right). Still... X-Git-Tag: 1.31.0-rc.0~50736 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=6cbacc93d49e560019a7d4c7fbae023d5637e757;p=lhc%2Fweb%2Fwiklou.git *Make entry point for hideuser aspect of blocks (requires 'hideuser' right). Still not ready for production use until log stuff from revisiondelete is fully merged in. --- diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 92195b874a..e93f6f693a 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -227,34 +227,35 @@ class IPBlockForm { "); - // 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(" - +   - " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), - 'wpHideName', 'wpHideName', $this->BlockHideName, - array( 'tabindex' => '9' ) ) . " + " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ), + 'wpEmailBan', 'wpEmailBan', $this->BlockEmail, + array( 'tabindex' => '10' )) . " "); } - 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(" - +   - " . wfCheckLabel( wfMsgHtml( 'ipbemailban' ), - 'wpEmailBan', 'wpEmailBan', $this->BlockEmail, - array( 'tabindex' => '10' )) . " + " . wfCheckLabel( wfMsgHtml( 'ipbhidename' ), + 'wpHideName', 'wpHideName', $this->BlockHideName, + array( 'tabindex' => '9' ) ) . " "); } + $wgOut->addHTML("   diff --git a/skins/common/block.js b/skins/common/block.js index 430c1d54d3..741dd76ae2 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -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' : ''; }