From 6cbacc93d49e560019a7d4c7fbae023d5637e757 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 23 Nov 2007 22:03:12 +0000 Subject: [PATCH] *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. --- includes/SpecialBlockip.php | 27 ++++++++++++++------------- skins/common/block.js | 3 +++ 2 files changed, 17 insertions(+), 13 deletions(-) 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' : ''; } -- 2.20.1