X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateAndPromote.php;h=d3efca6f42a7f16ea9fd2707e850c494567ed58e;hb=66c91ac85b26c042b3d07255d1d7954be507699b;hp=1872716fb5c4eef67624b3e8cbcc9126134f7f76;hpb=61898ad28ed69c5b391eb43e0db9386279b9612c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 1872716fb5..d3efca6f42 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -63,15 +63,15 @@ class CreateAndPromote extends Maintenance { $user = User::newFromName( $username ); if ( !is_object( $user ) ) { - $this->error( "invalid username.", true ); + $this->fatalError( "invalid username." ); } $exists = ( 0 !== $user->idForName() ); if ( $exists && !$force ) { - $this->error( "Account exists. Perhaps you want the --force option?", true ); + $this->fatalError( "Account exists. Perhaps you want the --force option?" ); } elseif ( !$exists && !$password ) { - $this->error( "Argument required!", false ); + $this->error( "Argument required!" ); $this->maybeHelp( true ); } elseif ( $exists ) { $inGroups = $user->getGroups(); @@ -133,7 +133,7 @@ class CreateAndPromote extends Maintenance { $user->saveSettings(); } } catch ( PasswordError $pwe ) { - $this->error( $pwe->getText(), true ); + $this->fatalError( $pwe->getText() ); } } @@ -150,5 +150,5 @@ class CreateAndPromote extends Maintenance { } } -$maintClass = "CreateAndPromote"; +$maintClass = CreateAndPromote::class; require_once RUN_MAINTENANCE_IF_MAIN;