From: Reedy Date: Tue, 12 Sep 2017 22:24:12 +0000 (+0100) Subject: Use db query builder not raw sql X-Git-Tag: 1.31.0-rc.0~2129^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;ds=sidebyside;h=90534ed5daa7f68d6d7bf349afd55f2c8295f067;p=lhc%2Fweb%2Fwiklou.git Use db query builder not raw sql Change-Id: I8e26932e28fdda9a52e0486c5d2eb269eb9ecae5 Follows-up: Ice1bdae3d16cf365da14c6df0e8d91d2b914e064 --- diff --git a/maintenance/populateIpChanges.php b/maintenance/populateIpChanges.php index eb60f801cd..e086c5e9e6 100644 --- a/maintenance/populateIpChanges.php +++ b/maintenance/populateIpChanges.php @@ -67,12 +67,12 @@ TEXT $this->output( "Copying IP revisions to ip_changes, from rev_id $start to rev_id $end\n" ); while ( $blockStart <= $end ) { - $cond = "rev_id >= $blockStart AND rev_user = 0 ORDER BY rev_id ASC LIMIT " . $this->mBatchSize; $rows = $dbw->select( 'revision', [ 'rev_id', 'rev_timestamp', 'rev_user_text' ], - $cond, - __METHOD__ + [ "rev_id >= $blockStart", 'rev_user' => 0 ], + __METHOD__, + [ 'ORDER BY' => 'rev_id ASC', 'LIMIT' => $this->mBatchSize ] ); if ( !$rows || $rows->numRows() === 0 ) {