X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcreateAndPromote.php;h=b92735b1a501749b05429d7df75b8e1946223b10;hb=d42d1dbabd7dc81b454cfad8bbbe787cdd3cdf9f;hp=acc28173d62d710b47e6b4279376916f7dc8b329;hpb=7710afe5690b76a4161b9c040f81be340384e8c6;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/createAndPromote.php b/maintenance/createAndPromote.php index acc28173d6..b92735b1a5 100644 --- a/maintenance/createAndPromote.php +++ b/maintenance/createAndPromote.php @@ -114,14 +114,14 @@ class CreateAndPromote extends Maintenance { if ( !$exists ) { // Create the user via AuthManager as there may be various side - // effects that are perfomed by the configured AuthManager chain. + // effects that are performed by the configured AuthManager chain. $status = MediaWiki\Auth\AuthManager::singleton()->autoCreateUser( $user, MediaWiki\Auth\AuthManager::AUTOCREATE_SOURCE_MAINT, false ); if ( !$status->isGood() ) { - $this->fatalError( $status->getWikiText( null, null, 'en' ) ); + $this->fatalError( $status->getMessage( false, false, 'en' )->text() ); } } @@ -134,7 +134,7 @@ class CreateAndPromote extends Maintenance { 'retype' => $password, ] ); if ( !$status->isGood() ) { - throw new PasswordError( $status->getWikiText( null, null, 'en' ) ); + throw new PasswordError( $status->getMessage( false, false, 'en' )->text() ); } if ( $exists ) { $this->output( "Password set.\n" ); @@ -150,7 +150,7 @@ class CreateAndPromote extends Maintenance { if ( !$exists ) { # Increment site_stats.ss_users - $ssu = new SiteStatsUpdate( 0, 0, 0, 0, 1 ); + $ssu = SiteStatsUpdate::factory( [ 'users' => 1 ] ); $ssu->doUpdate(); }