summaryrefslogtreecommitdiff
path: root/maintenance/cleanupCaps.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /maintenance/cleanupCaps.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'maintenance/cleanupCaps.php')
-rw-r--r--maintenance/cleanupCaps.php13
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 );
}
}