35 if ( $vars[
'wgUpgradeKey'] !==
false
36 && $this->getVar(
'_UpgradeKeySupplied' )
37 && $this->getVar(
'wgUpgradeKey' ) === $vars[
'wgUpgradeKey']
45 $this->parent->showStatusBox(
$status );
46 $this->endForm(
'continue' );
53 if ( $vars[
'wgUpgradeKey'] ===
false ) {
54 if ( $this->getVar(
'wgUpgradeKey',
false ) ===
false ) {
55 $secretKey = $this->getVar(
'wgSecretKey' );
56 $this->parent->generateKeys();
57 $this->setVar(
'wgSecretKey', $secretKey );
58 $this->setVar(
'_UpgradeKeySupplied',
true );
61 $this->addHTML( $this->parent->getInfoBox(
62 wfMessage(
'config-upgrade-key-missing',
"<pre dir=\"ltr\">\$wgUpgradeKey = '" .
63 $this->getVar(
'wgUpgradeKey' ) .
"';</pre>" )->plain()
65 $this->endForm(
'continue' );
72 $r = $this->parent->request;
73 if ( $r->wasPosted() ) {
74 $key = $r->getText(
'config_wgUpgradeKey' );
75 if ( !$key || $key !== $vars[
'wgUpgradeKey'] ) {
76 $this->parent->showError(
'config-localsettings-badkey' );
86 $this->parent->showStatusBox(
$status );
104 $this->parent->getInfoBox(
wfMessage(
'config-localsettings-upgrade' )->plain() ) .
106 $this->parent->getTextBox( [
107 'var' =>
'wgUpgradeKey',
108 'label' =>
'config-localsettings-key',
109 'attribs' => [
'autocomplete' =>
'off' ],
112 $this->endForm(
'continue' );
123 foreach ( $names as $name ) {
124 if ( !isset( $vars[$name] ) ) {
125 $status->fatal(
'config-localsettings-incomplete', $name );
127 $this->setVar( $name, $vars[$name] );
142 if ( !isset( $vars[
'wgDBtype'] ) ||
149 $requiredVars = [
'wgDBtype' ];
151 $installer = $this->parent->getDBInstaller();
157 $this->setVar(
'_InstallUser', $vars[
'wgDBadminuser'] ?? $vars[
'wgDBuser'] );
158 $this->setVar(
'_InstallPassword', $vars[
'wgDBadminpassword'] ?? $vars[
'wgDBpassword'] );
161 $status = $installer->getConnection();
164 $status->replaceMessage(
'config-connection-error',
165 'config-localsettings-connection-error' );
171 $this->setVar(
'_ExistingDBSettings',
true );
174 $this->setVar(
'wgAuthenticationTokenVersion',
175 $vars[
'wgAuthenticationTokenVersion'] ??
null