From: Brion Vibber Date: Wed, 15 Jun 2011 20:42:16 +0000 (+0000) Subject: Another partial fix for Block test: update $this->mId on successful Block::insert() X-Git-Tag: 1.31.0-rc.0~29515 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=6286ac2971267b1ce8314ca6d8b1e752fa53f057;p=lhc%2Fweb%2Fwiklou.git Another partial fix for Block test: update $this->mId on successful Block::insert() --- diff --git a/includes/Block.php b/includes/Block.php index 280552b5fd..5afe5c55a6 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -415,10 +415,11 @@ class Block { array( 'IGNORE' ) ); $affected = $dbw->affectedRows(); + $this->mId = $dbw->insertId(); if ( $affected ) { $auto_ipd_ids = $this->doRetroactiveAutoblock(); - return array( 'id' => $ipb_id, 'autoIds' => $auto_ipd_ids ); + return array( 'id' => $this->mId, 'autoIds' => $auto_ipd_ids ); } return false;