(bug 18860) Allow non-anon-only blocks of IPs to block email
authorAlex Z <mrzman@users.mediawiki.org>
Thu, 21 May 2009 20:32:28 +0000 (20:32 +0000)
committerAlex Z <mrzman@users.mediawiki.org>
Thu, 21 May 2009 20:32:28 +0000 (20:32 +0000)
RELEASE-NOTES
includes/Block.php
skins/common/block.js

index 5346aca..e4ae1f9 100644 (file)
@@ -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 ===
 
index a44941f..b62fceb 100644 (file)
@@ -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 );
index 90211ef..e08bb15 100644 (file)
@@ -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 ) {