X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=1603ab0407f6fd1fdffabb1260e42e39caf404a5;hb=29f2d9d7857ee693f49d064c3a0513772b7a558c;hp=f6bb2532024ea2d2d79ec9502c805b76387aaad5;hpb=127c0072c4d29902fbf2dcfd63464042462270ed;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index f6bb253202..1603ab0407 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -59,15 +59,12 @@ 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. - $restrictions = [ 'edit' => $protection, 'move' => $protection ]; - - $t = Title::newFromText( $this->getArg() ); + $t = Title::newFromText( $this->getArg( 0 ) ); if ( !$t ) { - $this->error( "Invalid title", true ); + $this->fatalError( "Invalid title" ); } $restrictions = []; @@ -89,5 +86,5 @@ class Protect extends Maintenance { } } -$maintClass = "Protect"; +$maintClass = Protect::class; require_once RUN_MAINTENANCE_IF_MAIN;