From: Alex Z Date: Thu, 21 May 2009 20:32:28 +0000 (+0000) Subject: (bug 18860) Allow non-anon-only blocks of IPs to block email X-Git-Tag: 1.31.0-rc.0~41707 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=d6ba7192173eff2c230ef81aae3835d846c5fb25;p=lhc%2Fweb%2Fwiklou.git (bug 18860) Allow non-anon-only blocks of IPs to block email --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 5346aca929..e4ae1f9533 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -66,6 +66,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 5755) Introduce {{CURRENTMONTH1}} and {{LOCALMONTH1}} to display the month number without the leading zero * (bug 13456) categoriespagetext supports PLURAL +* (bug 18860) Blocks of IPs affecting registered users can now block email === Bug fixes in 1.16 === diff --git a/includes/Block.php b/includes/Block.php index a44941f131..b62fceb0aa 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -453,9 +453,12 @@ class Block { # Unset ipb_enable_autoblock for IP blocks, makes no sense if ( !$this->mUser ) { $this->mEnableAutoblock = 0; - $this->mBlockEmail = 0; //Same goes for email... + + } + # bug 18860: non-anon-only IP blocks should be allowed to block email + if ( !$this->mUser && $this->mAnonOnly ) { + $this->mBlockEmail = 0; } - if( !$this->mByName ) { if( $this->mBy ) { $this->mByName = User::whoIs( $this->mBy ); diff --git a/skins/common/block.js b/skins/common/block.js index 90211efa7c..e08bb15865 100644 --- a/skins/common/block.js +++ b/skins/common/block.js @@ -42,11 +42,6 @@ function updateBlockOptions() { if( autoblockRow ) { autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; } - - var emailblockRow = document.getElementById('wpEnableEmailBan'); - if( emailblockRow ) { - emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; - } var hideuserRow = document.getElementById('wpEnableHideUser'); if( hideuserRow ) {