Various fixes related to the blocking change re: autoblocks. On inserting an IP block...
authorAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Nov 2006 13:24:53 +0000 (13:24 +0000)
committerAndrew Garrett <werdna@users.mediawiki.org>
Fri, 3 Nov 2006 13:24:53 +0000 (13:24 +0000)
RELEASE-NOTES
includes/Block.php
includes/SpecialIpblocklist.php

index 48ea4a8..6ae9087 100644 (file)
@@ -132,6 +132,11 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 7785) Postgres compatibility for timestamps in RC feeds
 * (bug 7550) Normalize user parameter normally on Special:Log
 * (bug 7294) Fix PATH search for diff3 on install
+* Various fixes related to the blocking change re: autoblocks. On inserting
+  an IP block, the ipb_enable_autoblock field is now automagically blanked,
+  because it doesn't make any sense for an IP. Additionally, IP blocks
+  without the ipb_enable_autoblock option no longer show up as "autoblock
+  disabled" on Special:Ipblocklist.
 
 == Languages updated ==
 
index 679ff1e..8a0f27c 100644 (file)
@@ -367,6 +367,11 @@ class Block
                        $this->mAnonOnly = 0;
                }
 
+               # Unset ipb_enable_autoblock for IP blocks, makes no sense
+               if ( !$this->mUser ) {
+                       $this->mEnableAutoblock = 0;
+               }
+
                # Don't collide with expired blocks
                Block::purgeExpired();
                
index c249e7f..85764be 100644 (file)
@@ -277,7 +277,7 @@ class IPUnblockForm {
                if ( $block->mCreateAccount ) {
                        $properties[] = $msg['createaccountblock'];
                }
-               if (!$block->mEnableAutoblock ) {
+               if (!$block->mEnableAutoblock && !$block->mAddress ) {
                        $properties[] = $msg['noautoblockblock'];
                }