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" );
$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" );