From: Kaldari Date: Mon, 29 Aug 2016 23:29:24 +0000 (-0700) Subject: Fixing dry-run logic in updateCollation.php X-Git-Tag: 1.31.0-rc.0~5840^2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=c1bf1f369eed8ab7532f061172f2a605fc97dd42;p=lhc%2Fweb%2Fwiklou.git Fixing dry-run logic in updateCollation.php Currently if you run updateCollation.php in dry-run mode, it ignores the other parameters and doesn't give you a row estimate. Now it will behave the same as an actual run (just without making any changes to the database). Change-Id: I25a9751d8ab7554e7975e5f08122dd1ddaaf40a7 --- diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php index 922cc87213..930f533f95 100644 --- a/maintenance/updateCollation.php +++ b/maintenance/updateCollation.php @@ -101,7 +101,7 @@ TEXT 'STRAIGHT_JOIN' // per T58041 ]; - if ( $force || $dryRun ) { + if ( $force ) { $collationConds = []; } else { if ( $this->hasOption( 'previous-collation' ) ) { @@ -132,7 +132,11 @@ TEXT return; } - $this->output( "Fixing collation for $count rows.\n" ); + if ( $dryRun ) { + $this->output( "$count rows would be updated.\n" ); + } else { + $this->output( "Fixing collation for $count rows.\n" ); + } wfWaitForSlaves(); } $count = 0;