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=f6259e95c8fb6b8f481ccea9490c54e9ca970d4f;hpb=f873b499650ef5d27570f9cb96d01d1477f9e089;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc index f6259e95c8..8368c8449d 100644 --- a/maintenance/cleanupTable.inc +++ b/maintenance/cleanupTable.inc @@ -49,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 ); @@ -172,9 +173,3 @@ class TableCleanup extends Maintenance { } } -class TableCleanupTest extends TableCleanup { - function processRow( $row ) { - $this->progress( mt_rand( 0, 1 ) ); - } -} -