[bug 37746] string ids for content model and format.
[lhc/web/wiklou.git] / maintenance / cleanupTable.inc
index 60f2346..1c27976 100644 (file)
@@ -43,7 +43,7 @@ class TableCleanup extends Maintenance {
 
        public function execute() {
                global $wgUser;
-               $wgUser->setName( 'Conversion script' );
+               $wgUser = User::newFromName( 'Conversion script' );
                $this->dryrun = $this->hasOption( 'dry-run' );
                if ( $this->dryrun ) {
                        $this->output( "Checking for bad titles...\n" );
@@ -102,7 +102,7 @@ class TableCleanup extends Maintenance {
 
                $table = $params['table'];
                // count(*) would melt the DB for huge tables, we can estimate here
-               $dbr->estimateRowCount( $table, '*', '', __METHOD__ );
+               $count = $dbr->estimateRowCount( $table, '*', '', __METHOD__ );
                $this->init( $count, $table );
                $this->output( "Processing $table...\n" );