diff options
| author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
|---|---|---|
| committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
| commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
| tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /maintenance/rollbackEdits.php | |
| parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
| parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) | |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'maintenance/rollbackEdits.php')
| -rw-r--r-- | maintenance/rollbackEdits.php | 14 |
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; } } |
