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.

This commit is contained in:
Andrew Garrett 2006-11-03 13:24:53 +00:00
parent 90107635d3
commit 65957ef12c
3 changed files with 11 additions and 1 deletions

View 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 ==

View 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();

View file

@ -277,7 +277,7 @@ class IPUnblockForm {
if ( $block->mCreateAccount ) {
$properties[] = $msg['createaccountblock'];
}
if (!$block->mEnableAutoblock ) {
if (!$block->mEnableAutoblock && !$block->mAddress ) {
$properties[] = $msg['noautoblockblock'];
}