From: Brion Vibber Date: Sat, 11 Nov 2006 22:07:55 +0000 (+0000) Subject: * switched 'anon-only' block mode to default for IP blocks X-Git-Tag: 1.31.0-rc.0~55219 X-Git-Url: https://git.cyclocoop.org/?a=commitdiff_plain;h=727e4c3557058705a5a47887681d038acfdd9f6d;p=lhc%2Fweb%2Fwiklou.git * switched 'anon-only' block mode to default for IP blocks --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d7f9316b18..09e1f517bc 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialBlockip.php b/includes/SpecialBlockip.php index 7568b2eaca..fd1a8aa970 100644 --- a/includes/SpecialBlockip.php +++ b/includes/SpecialBlockip.php @@ -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 ) {