Index: trunk/phase3/maintenance/cleanupTable.inc |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | |
45 | 45 | public function execute() { |
46 | 46 | global $wgUser; |
47 | | - $wgUser->setName( 'Conversion script' ); |
| 47 | + $wgUser = User::newFromName( 'Conversion script' ); |
48 | 48 | $this->dryrun = $this->hasOption( 'dry-run' ); |
49 | 49 | if ( $this->dryrun ) { |
50 | 50 | $this->output( "Checking for bad titles...\n" ); |
Index: trunk/phase3/maintenance/cleanupCaps.php |
— | — | @@ -40,11 +40,15 @@ |
41 | 41 | |
42 | 42 | public function execute() { |
43 | 43 | global $wgCapitalLinks, $wgUser; |
| 44 | + |
| 45 | + if ( $wgCapitalLinks ) { |
| 46 | + $this->error( "\$wgCapitalLinks is on -- no need for caps links cleanup.", true ); |
| 47 | + } |
| 48 | + |
| 49 | + $wgUser = User::newFromName( 'Conversion script' ); |
| 50 | + |
44 | 51 | $this->namespace = intval( $this->getOption( 'namespace', 0 ) ); |
45 | 52 | $this->dryrun = $this->hasOption( 'dry-run' ); |
46 | | - $wgUser->setName( 'Conversion script' ); |
47 | | - if ( $wgCapitalLinks ) |
48 | | - $this->error( "\$wgCapitalLinks is on -- no need for caps links cleanup.", true ); |
49 | 53 | |
50 | 54 | $this->runTable( array( |
51 | 55 | 'table' => 'page', |