From ae6aaa564b8b744b593c5c435c881b4a29f11dce Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Tue, 11 Jan 2005 08:05:22 +0000 Subject: [PATCH] * (bug 1204) Blocks do not expire automatically --- includes/Block.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Block.php b/includes/Block.php index 3f0ed48717..61143f83d3 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -58,6 +58,7 @@ class Block function load( $address = '', $user = 0, $killExpired = true ) { $fname = 'Block::load'; + wfDebug( "Block::load: '$address', '$user', $killExpired\n" ); $ret = false; $killed = false; @@ -219,19 +220,22 @@ class Block function deleteIfExpired() { if ( $this->isExpired() ) { + wfDebug( "Block::deleteIfExpired() -- deleting\n" ); $this->delete(); return true; } else { + wfDebug( "Block::deleteIfExpired() -- not expired\n" ); return false; } } function isExpired() { + wfDebug( "Block::isExpired() checking current " . wfTimestampNow() . " vs $this->mExpiry\n" ); if ( !$this->mExpiry ) { return false; } else { - return wfTimestamp() > $this->mExpiry; + return wfTimestampNow() > $this->mExpiry; } } -- 2.20.1