summaryrefslogtreecommitdiff
path: root/maintenance/rollbackEdits.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/rollbackEdits.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/rollbackEdits.php')
-rw-r--r--maintenance/rollbackEdits.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/maintenance/rollbackEdits.php b/maintenance/rollbackEdits.php
index e5e33c02..967dda85 100644
--- a/maintenance/rollbackEdits.php
+++ b/maintenance/rollbackEdits.php
@@ -33,8 +33,14 @@ require_once __DIR__ . '/Maintenance.php';
class RollbackEdits extends Maintenance {
public function __construct() {
parent::__construct();
- $this->mDescription = "Rollback all edits by a given user or IP provided they're the most recent edit";
- $this->addOption( 'titles', 'A list of titles, none means all titles where the given user is the most recent', false, true );
+ $this->mDescription =
+ "Rollback all edits by a given user or IP provided they're the most recent edit";
+ $this->addOption(
+ 'titles',
+ 'A list of titles, none means all titles where the given user is the most recent',
+ false,
+ true
+ );
$this->addOption( 'user', 'A user or IP to rollback all edits for', true, true );
$this->addOption( 'summary', 'Edit summary to use', false, true );
$this->addOption( 'bot', 'Mark the edits as bot' );
@@ -66,6 +72,7 @@ class RollbackEdits extends Maintenance {
if ( !$titles ) {
$this->output( 'No suitable titles to be rolled back' );
+
return;
}
@@ -84,7 +91,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
+ * @param string $user A name to check against rev_user_text
* @return array
*/
private function getRollbackTitles( $user ) {
@@ -99,6 +106,7 @@ class RollbackEdits extends Maintenance {
foreach ( $results as $row ) {
$titles[] = Title::makeTitle( $row->page_namespace, $row->page_title );
}
+
return $titles;
}
}