From a7796f3b9eb6527a9aaffc812f03ce1cd9b4d43e Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 8 Oct 2005 14:45:51 +0000 Subject: [PATCH] Committed patch by Ting Chen to fix bug #856 (Auto-IP blocks last past the original block length). --- includes/User.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/User.php b/includes/User.php index 2aea2e9e96..43bc530346 100644 --- a/includes/User.php +++ b/includes/User.php @@ -1446,6 +1446,13 @@ class User { # Check if this IP address is already blocked $ipblock = Block::newFromDB( wfGetIP() ); if ( $ipblock->isValid() ) { + # If the user is already blocked. Then check if the autoblock would + # excede the user block. If it would excede, then do nothing, else + # prolong block time + if ($userblock->mExpiry && + ($userblock->mExpiry < Block::getAutoblockExpiry($ipblock->mTimestamp))) { + return; + } # Just update the timestamp $ipblock->updateTimestamp(); return; -- 2.20.1