X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateAndPromote.php;h=94a18767e627e59cee150e3f67d7ef724bbf9ed5;hb=0fa37e40a03b06def908e90cb981ffd7b864ead2;hp=81fbbb3d3246042ca671b6c4d0ba3f2a2e0204d1;hpb=99e968b5aa933a33a45216f6355f00780a0cf203;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index 81fbbb3d32..94a18767e6 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -38,7 +38,7 @@ class CreateAndPromote extends Maintenance { parent::__construct(); $this->mDescription = "Create a new user account and/or grant it additional rights"; $this->addOption( "force", "If acccount exists already, just grant it rights or change password." ); - foreach( self::$permitRoles as $role ) { + foreach ( self::$permitRoles as $role ) { $this->addOption( $role, "Add the account to the {$role} group" ); } $this->addArg( "username", "Username of new user" ); @@ -60,10 +60,10 @@ class CreateAndPromote extends Maintenance { if ( $exists && !$force ) { $this->error( "Account exists. Perhaps you want the --force option?", true ); - } else if ( !$exists && !$password ) { + } elseif ( !$exists && !$password ) { $this->error( "Argument required!", false ); $this->maybeHelp( true ); - } else if ( $exists ) { + } elseif ( $exists ) { $inGroups = $user->getGroups(); } @@ -72,7 +72,7 @@ class CreateAndPromote extends Maintenance { if ( $exists && !$password && count( $promotions ) === 0 ) { $this->output( "Account exists and nothing to do.\n" ); return; - } else if ( count( $promotions ) !== 0 ) { + } elseif ( count( $promotions ) !== 0 ) { $promoText = "User:{$username} into " . implode( ', ', $promotions ) . "...\n"; if ( $exists ) { $this->output( wfWikiID() . ": Promoting $promoText" );