r17381 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17380‎ | r17381 | r17382 >
Date:13:24, 3 November 2006
Author:werdna
Status:old
Tags:
Comment:
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 block. Additionally, IP blocks without the ipb_enable_autoblock option no longer show up as "autoblock disabled" on Special:Ipblocklist.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Block.php (modified) (history)
  • /trunk/phase3/includes/SpecialIpblocklist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialIpblocklist.php
@@ -277,7 +277,7 @@
278278 if ( $block->mCreateAccount ) {
279279 $properties[] = $msg['createaccountblock'];
280280 }
281 - if (!$block->mEnableAutoblock ) {
 281+ if (!$block->mEnableAutoblock && !$block->mAddress ) {
282282 $properties[] = $msg['noautoblockblock'];
283283 }
284284
Index: trunk/phase3/includes/Block.php
@@ -367,6 +367,11 @@
368368 $this->mAnonOnly = 0;
369369 }
370370
 371+ # Unset ipb_enable_autoblock for IP blocks, makes no sense
 372+ if ( !$this->mUser ) {
 373+ $this->mEnableAutoblock = 0;
 374+ }
 375+
371376 # Don't collide with expired blocks
372377 Block::purgeExpired();
373378
Index: trunk/phase3/RELEASE-NOTES
@@ -132,6 +132,11 @@
133133 * (bug 7785) Postgres compatibility for timestamps in RC feeds
134134 * (bug 7550) Normalize user parameter normally on Special:Log
135135 * (bug 7294) Fix PATH search for diff3 on install
 136+* Various fixes related to the blocking change re: autoblocks. On inserting
 137+ an IP block, the ipb_enable_autoblock field is now automagically blanked,
 138+ because it doesn't make any sense for an IP. Additionally, IP blocks
 139+ without the ipb_enable_autoblock option no longer show up as "autoblock
 140+ disabled" on Special:Ipblocklist.
136141
137142 == Languages updated ==
138143

Follow-up revisions

RevisionCommit summaryAuthorDate
r17491(bug 7833) Fix regression causing 'autoblock disabled' to not appear where ap...werdna13:21, 8 November 2006