* switched 'anon-only' block mode to default for IP blocks
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 11 Nov 2006 22:07:55 +0000 (22:07 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 11 Nov 2006 22:07:55 +0000 (22:07 +0000)
RELEASE-NOTES
includes/SpecialBlockip.php

index d7f9316..09e1f51 100644 (file)
@@ -177,6 +177,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   as of MW 1.8 than it used to be. Install or upgrade now aborts with a
   warning and a request to upgrade.
 * (bug 6440) Updated indexes to improve backlinking queries (links, templates, images)
+* Switched 'anon-only' block mode to default for IP blocks
+
 
 == Languages updated ==
 
index 7568b2e..fd1a8aa 100644 (file)
@@ -46,22 +46,13 @@ class IPBlockForm {
                $this->BlockReason = $wgRequest->getText( 'wpBlockReason' );
                $this->BlockExpiry = $wgRequest->getVal( 'wpBlockExpiry', wfMsg('ipbotheroption') );
                $this->BlockOther = $wgRequest->getVal( 'wpBlockOther', '' );
-               $this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly' );
 
                # Unchecked checkboxes are not included in the form data at all, so having one 
                # that is true by default is a bit tricky
-               if ( $wgRequest->wasPosted() ) {
-                       $this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', false );
-               } else {
-                       $this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', true );
-               }
-
-               if ( $wgRequest->wasPosted() ) {
-                       $this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', false );
-               } else {
-                       $this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', true );
-               }
-
+               $byDefault = !$wgRequest->wasPosted();
+               $this->BlockAnonOnly = $wgRequest->getBool( 'wpAnonOnly', $byDefault );
+               $this->BlockCreateAccount = $wgRequest->getBool( 'wpCreateAccount', $byDefault );
+               $this->BlockEnableAutoblock = $wgRequest->getBool( 'wpEnableAutoblock', $byDefault );
        }
 
        function showForm( $err ) {