From: Mark A. Hershberger Date: Tue, 26 Nov 2013 03:08:23 +0000 (-0500) Subject: Move reference to $row where it is in-scope and doesn't produce X-Git-Tag: 1.31.0-rc.0~17893 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=0b5acd06234cbed913ccb9b41dc95464ed3d9f30;p=lhc%2Fweb%2Fwiklou.git Move reference to $row where it is in-scope and doesn't produce E_STRICT notices. Bug: 57575 Change-Id: Ic508ebbb0816acd32be355b5f19b46637d58c36a --- diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 964b3138d7..7ca04b4134 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -47,7 +47,7 @@ class UpdateCollation extends Maintenance { $this->mDescription = <<getBatchCondition( $row, $dbw ) ); + } } if ( !$dryRun ) { $dbw->commit( __METHOD__ ); } - if ( $row ) { - $batchConds = array( $this->getBatchCondition( $row ) ); - } - $count += $res->numRows(); $this->output( "$count done.\n" ); @@ -219,8 +218,7 @@ TEXT; * Return an SQL expression selecting rows which sort above the given row, * assuming an ordering of cl_to, cl_type, cl_from */ - function getBatchCondition( $row ) { - $dbw = $this->getDB( DB_MASTER ); + function getBatchCondition( $row, $dbw ) { $fields = array( 'cl_to', 'cl_type', 'cl_from' ); $first = true; $cond = false;