X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupTable.inc;h=84e3aee0fcc0de636595ac65e8222eb8f15dcfdc;hb=7c21be6c559cd816434cc1772eac682f12e161b1;hp=cbd1be6b805b8b08c3351ed40598bf2f8e2a635d;hpb=4503e530474a4fa3ae1a02010f6fc34e152ec695;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc index cbd1be6b80..84e3aee0fc 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 );