class CliInstaller extends Installer {
private $specifiedScriptPath = false;
- private $optionMap = array(
+ private $optionMap = [
'dbtype' => 'wgDBtype',
'dbserver' => 'wgDBserver',
'dbname' => 'wgDBname',
'dbpath' => 'wgSQLiteDataDir',
'server' => 'wgServer',
'scriptpath' => 'wgScriptPath',
- );
+ ];
/**
* Constructor.
* @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();
$wgContLang = Language::factory( $option['lang'] );
$wgLang = Language::factory( $option['lang'] );
$wgLanguageCode = $option['lang'];
+ RequestContext::getMain()->setLanguage( $wgLang );
}
$this->setVar( 'wgSitename', $siteName );
}
$this->performInstallation(
- array( $this, 'startStage' ),
- array( $this, 'endStage' )
+ [ $this, 'startStage' ],
+ [ $this, 'endStage' ]
);
}
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 );
}