X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=blobdiff_plain;f=maintenance%2FcleanupTable.inc;h=8368c8449d581991b8ceda3ed4891e7d5ae7ba94;hb=7d78861743a4c03519046d42f06d44cf437e7804;hp=cbd1be6b805b8b08c3351ed40598bf2f8e2a635d;hpb=754334f92a637190b7d6786413319f6e687779f0;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc index cbd1be6b80..8368c8449d 100644 --- a/maintenance/cleanupTable.inc +++ b/maintenance/cleanupTable.inc @@ -37,7 +37,6 @@ class TableCleanup extends Maintenance { ); protected $dryrun = false; - protected $maxLag = 10; # if slaves are lagged more than 10 secs, wait public $batchSize = 100; public $reportInterval = 100; @@ -50,11 +49,12 @@ class TableCleanup extends Maintenance { public function execute() { global $wgUser; - $wgUser = User::newFromName( 'Conversion script' ); $this->dryrun = $this->hasOption( 'dry-run' ); if ( $this->dryrun ) { + $wgUser = User::newFromName( 'Conversion script' ); $this->output( "Checking for bad titles...\n" ); } else { + $wgUser = User::newSystemUser( 'Conversion script', array( 'steal' => true ) ); $this->output( "Checking and fixing bad titles...\n" ); } $this->runTable( $this->defaultParams ); @@ -173,9 +173,3 @@ class TableCleanup extends Maintenance { } } -class TableCleanupTest extends TableCleanup { - function processRow( $row ) { - $this->progress( mt_rand( 0, 1 ) ); - } -} -