MWHttpRequest: Restore ability to pass null for $options
[lhc/web/wiklou.git] / maintenance / rollbackEdits.php
index 10c107e..34bc62b 100644 (file)
@@ -50,7 +50,7 @@ class RollbackEdits extends Maintenance {
                $user = $this->getOption( 'user' );
                $username = User::isIP( $user ) ? $user : User::getCanonicalName( $user );
                if ( !$username ) {
-                       $this->error( 'Invalid username', true );
+                       $this->fatalError( 'Invalid username' );
                }
 
                $bot = $this->hasOption( 'bot' );
@@ -95,7 +95,7 @@ class RollbackEdits extends Maintenance {
         * @return array
         */
        private function getRollbackTitles( $user ) {
-               $dbr = $this->getDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_REPLICA );
                $titles = [];
                $results = $dbr->select(
                        [ 'page', 'revision' ],
@@ -111,5 +111,5 @@ class RollbackEdits extends Maintenance {
        }
 }
 
-$maintClass = 'RollbackEdits';
+$maintClass = RollbackEdits::class;
 require_once RUN_MAINTENANCE_IF_MAIN;