choose the min between the two block times when autoblocking a user with
authorErik Moeller <erik@users.mediawiki.org>
Wed, 7 Apr 2004 01:56:35 +0000 (01:56 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Wed, 7 Apr 2004 01:56:35 +0000 (01:56 +0000)
a set expiry time

includes/User.php

index 35d5526..287c49c 100644 (file)
@@ -625,7 +625,7 @@ class User {
                # If the user is already blocked with an expiry date, we don't 
                # want to pile on top of that!
                if($userblock->mExpiry) {
-                       $ipblock->mExpiry = $userblock->mExpiry;
+                       $ipblock->mExpiry = min ( $userblock->mExpiry, Block::getAutoblockExpiry( $ipblock->mTimestamp ));
                } else {
                        $ipblock->mExpiry = Block::getAutoblockExpiry( $ipblock->mTimestamp );
                }