rdbms: remove "m" member prefix from DatabaseMssql
[lhc/web/wiklou.git] / maintenance / protect.php
index 31b2101..b47476a 100644 (file)
@@ -41,8 +41,8 @@ class Protect extends Maintenance {
        }
 
        public function execute() {
-               $userName = $this->getOption( 'u', false );
-               $reason = $this->getOption( 'r', '' );
+               $userName = $this->getOption( 'user', false );
+               $reason = $this->getOption( 'reason', '' );
 
                $cascade = $this->hasOption( 'cascade' );
 
@@ -59,7 +59,7 @@ class Protect extends Maintenance {
                        $user = User::newFromName( $userName );
                }
                if ( !$user ) {
-                       $this->error( "Invalid username", true );
+                       $this->fatalError( "Invalid username" );
                }
 
                // @todo FIXME: This is reset 7 lines down.
@@ -67,7 +67,7 @@ class Protect extends Maintenance {
 
                $t = Title::newFromText( $this->getArg() );
                if ( !$t ) {
-                       $this->error( "Invalid title", true );
+                       $this->fatalError( "Invalid title" );
                }
 
                $restrictions = [];
@@ -89,5 +89,5 @@ class Protect extends Maintenance {
        }
 }
 
-$maintClass = "Protect";
+$maintClass = Protect::class;
 require_once RUN_MAINTENANCE_IF_MAIN;