summaryrefslogtreecommitdiff
path: root/maintenance/rollbackEdits.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/rollbackEdits.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'maintenance/rollbackEdits.php')
-rw-r--r--maintenance/rollbackEdits.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php
index e1c126e1..3e57e01f 100644
--- a/maintenance/rollbackEdits.php
+++ b/maintenance/rollbackEdits.php
@@ -62,10 +62,12 @@ class RollbackEdits extends Maintenance {
return;
}
+ $doer = User::newFromName( 'Maintenance script' );
+
foreach ( $titles as $t ) {
- $a = new Article( $t );
- $this->output( 'Processing ' . $t->getPrefixedText() . '...' );
- if ( !$a->commitRollback( $user, $summary, $bot, $results ) ) {
+ $page = WikiPage::factory( $t );
+ $this->output( 'Processing ' . $t->getPrefixedText() . '... ' );
+ if ( !$page->commitRollback( $user, $summary, $bot, $results, $doer ) ) {
$this->output( "done\n" );
} else {
$this->output( "failed\n" );
@@ -76,6 +78,7 @@ class RollbackEdits extends Maintenance {
/**
* Get all pages that should be rolled back for a given user
* @param $user String a name to check against rev_user_text
+ * @return array
*/
private function getRollbackTitles( $user ) {
$dbr = wfGetDB( DB_SLAVE );