$this->addHTML(
$this->parent->getInfoBox( wfMessage( 'config-localsettings-upgrade' )->plain() ) .
'<br />' .
- $this->parent->getTextBox( array(
+ $this->parent->getTextBox( [
'var' => 'wgUpgradeKey',
'label' => 'config-localsettings-key',
- 'attribs' => array( 'autocomplete' => 'off' ),
- ) )
+ 'attribs' => [ 'autocomplete' => 'off' ],
+ ] )
);
$this->endForm( 'continue' );
}
}
// Set the relevant variables from LocalSettings.php
- $requiredVars = array( 'wgDBtype' );
+ $requiredVars = [ 'wgDBtype' ];
$status = $this->importVariables( $requiredVars, $vars );
$installer = $this->parent->getDBInstaller();
$status->merge( $this->importVariables( $installer->getGlobalNames(), $vars ) );
return $status;
}
- if ( isset( $vars['wgDBadminuser'] ) ) {
- $this->setVar( '_InstallUser', $vars['wgDBadminuser'] );
- } else {
- $this->setVar( '_InstallUser', $vars['wgDBuser'] );
- }
- if ( isset( $vars['wgDBadminpassword'] ) ) {
- $this->setVar( '_InstallPassword', $vars['wgDBadminpassword'] );
- } else {
- $this->setVar( '_InstallPassword', $vars['wgDBpassword'] );
- }
+ $this->setVar( '_InstallUser', $vars['wgDBadminuser'] ?? $vars['wgDBuser'] );
+ $this->setVar( '_InstallPassword', $vars['wgDBadminpassword'] ?? $vars['wgDBpassword'] );
// Test the database connection
$status = $installer->getConnection();
// Copy $wgAuthenticationTokenVersion too, if it exists
$this->setVar( 'wgAuthenticationTokenVersion',
- isset( $vars['wgAuthenticationTokenVersion'] )
- ? $vars['wgAuthenticationTokenVersion']
- : null
+ $vars['wgAuthenticationTokenVersion'] ?? null
);
return $status;