X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2Fprotect.php;h=b47476a58c86198bf5242833421ef64766fb0b39;hb=bc4417a522553d208767c7f42d70b42685c68051;hp=f6bb2532024ea2d2d79ec9502c805b76387aaad5;hpb=a3b1ef7c21ba9af94f611f6ca1d64e75710db176;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/protect.php b/maintenance/protect.php index f6bb253202..b47476a58c 100644 --- a/maintenance/protect.php +++ b/maintenance/protect.php @@ -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;