From: Platonides Date: Sat, 17 Apr 2010 20:59:05 +0000 (+0000) Subject: Follow up r64982. Autoblocks aren't automatically set just by storing ipb_enable_auto... X-Git-Tag: 1.31.0-rc.0~37076 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=38e64983a20ab73c43b802617e4585fbdd34941d;p=lhc%2Fweb%2Fwiklou.git 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. --- 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();