diff options
Diffstat (limited to 'maintenance/cleanupCaps.php')
-rw-r--r-- | maintenance/cleanupCaps.php | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/maintenance/cleanupCaps.php b/maintenance/cleanupCaps.php index 2d945a52..6f8e180c 100644 --- a/maintenance/cleanupCaps.php +++ b/maintenance/cleanupCaps.php @@ -40,11 +40,15 @@ class CapsCleanup extends TableCleanup { public function execute() { global $wgCapitalLinks, $wgUser; + + if ( $wgCapitalLinks ) { + $this->error( "\$wgCapitalLinks is on -- no need for caps links cleanup.", true ); + } + + $wgUser = User::newFromName( 'Conversion script' ); + $this->namespace = intval( $this->getOption( 'namespace', 0 ) ); $this->dryrun = $this->hasOption( 'dry-run' ); - $wgUser->setName( 'Conversion script' ); - if ( $wgCapitalLinks ) - $this->error( "\$wgCapitalLinks is on -- no need for caps links cleanup.", true ); $this->runTable( array( 'table' => 'page', @@ -88,9 +92,8 @@ class CapsCleanup extends TableCleanup { return $this->processRow( $row ); } } - } else { - $this->progress( 0 ); } + return $this->progress( 0 ); } } |