X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=eae615471a79612995429bebc2a2ae7eead9e054;hb=8bd192cefc98af487cf68b81ae093d9af6d0be4e;hp=31b2101c685bb405b5c48e0de47571ff8903d689;hpb=d42754e47722436ef52218f21a8e544a05ee9ad7;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index 31b2101c68..eae615471a 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -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 = [];