X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Finstaller%2FCliInstaller.php;h=661c3ec0b5c28848206ba9c4f49c4b39df60ef83;hb=33cb9b0d30aff88300d2708e0b820f9db9d2a4dc;hp=72907408ce095af7b7a12f0db9b602ad2a5686ad;hpb=e6e68618810b828a7de84dfe164e768da8ba90bf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 72907408ce..661c3ec0b5 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -30,7 +30,7 @@ class CliInstaller extends Installer { private $specifiedScriptPath = false; - private $optionMap = array( + private $optionMap = [ 'dbtype' => 'wgDBtype', 'dbserver' => 'wgDBserver', 'dbname' => 'wgDBname', @@ -44,7 +44,7 @@ class CliInstaller extends Installer { 'dbpath' => 'wgSQLiteDataDir', 'server' => 'wgServer', 'scriptpath' => 'wgScriptPath', - ); + ]; /** * Constructor. @@ -53,7 +53,7 @@ class CliInstaller extends Installer { * @param string $admin * @param array $option */ - function __construct( $siteName, $admin = null, array $option = array() ) { + function __construct( $siteName, $admin = null, array $option = [] ) { global $wgContLang; parent::__construct(); @@ -75,6 +75,7 @@ class CliInstaller extends Installer { $wgContLang = Language::factory( $option['lang'] ); $wgLang = Language::factory( $option['lang'] ); $wgLanguageCode = $option['lang']; + RequestContext::getMain()->setLanguage( $wgLang ); } $this->setVar( 'wgSitename', $siteName ); @@ -130,8 +131,8 @@ class CliInstaller extends Installer { } $this->performInstallation( - array( $this, 'startStage' ), - array( $this, 'endStage' ) + [ $this, 'startStage' ], + [ $this, 'endStage' ] ); } @@ -194,11 +195,11 @@ class CliInstaller extends Installer { if ( count( $warnings ) !== 0 ) { foreach ( $warnings as $w ) { - call_user_func_array( array( $this, 'showMessage' ), $w ); + call_user_func_array( [ $this, 'showMessage' ], $w ); } } - if ( !$status->isOk() ) { + if ( !$status->isOK() ) { echo "\n"; exit( 1 ); }