From 38e64983a20ab73c43b802617e4585fbdd34941d Mon Sep 17 00:00:00 2001 From: Platonides Date: Sat, 17 Apr 2010 20:59:05 +0000 Subject: [PATCH] Follow up r64982. Autoblocks aren't automatically set just by storing ipb_enable_autoblock, we need to look for them. So do this properly and use Block class to insert the block. --- includes/Block.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/Block.php b/includes/Block.php index 2367525200..7ec7b6f37d 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -377,9 +377,10 @@ class Block { * * @return Boolean: whether or not the insertion was successful. */ - public function insert() { + public function insert($dbw = null) { wfDebug( "Block::insert; timestamp {$this->mTimestamp}\n" ); - $dbw = wfGetDB( DB_MASTER ); + if ( $dbw === null) + $dbw = wfGetDB( DB_MASTER ); $this->validateBlockParams(); $this->initialiseRange(); -- 2.20.1