40 if ( $vars[
'wgUpgradeKey'] !==
false
41 && $this->
getVar(
'_UpgradeKeySupplied' )
42 && $this->
getVar(
'wgUpgradeKey' ) === $vars[
'wgUpgradeKey']
46 if ( $status->isOK() ) {
50 $this->parent->showStatusBox( $status );
58 if ( $vars[
'wgUpgradeKey'] ===
false ) {
59 $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()
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' );
83 if ( $status->isOK() ) {
86 $this->parent->showStatusBox( $status );
104 $this->parent->getInfoBox(
wfMessage(
'config-localsettings-upgrade' )->plain() ) .
106 $this->parent->getTextBox( [
107 'var' =>
'wgUpgradeKey',
109 'label' =>
'config-localsettings-key',
110 'attribs' => [
'autocomplete' =>
'off' ],
123 $status = Status::newGood();
124 foreach ( $names as $name ) {
125 if ( !isset( $vars[$name] ) ) {
126 $status->fatal(
'config-localsettings-incomplete', $name );
128 $this->
setVar( $name, $vars[$name] );
143 if ( !isset( $vars[
'wgDBtype'] ) ||
146 return Status::newFatal(
'config-localsettings-connection-error',
'' );
150 $requiredVars = [
'wgDBtype' ];
152 $installer = $this->parent->getDBInstaller();
153 $status->merge( $this->
importVariables( $installer->getGlobalNames(), $vars ) );
154 if ( !$status->isOK() ) {
158 $this->
setVar(
'_InstallUser', $vars[
'wgDBadminuser'] ?? $vars[
'wgDBuser'] );
159 $this->
setVar(
'_InstallPassword', $vars[
'wgDBadminpassword'] ?? $vars[
'wgDBpassword'] );
163 if ( !$status->isOK() ) {
165 $status->replaceMessage(
'config-connection-error',
166 'config-localsettings-connection-error' );
172 $this->
setVar(
'_ExistingDBSettings',
true );
175 $this->
setVar(
'wgAuthenticationTokenVersion',
176 $vars[
'wgAuthenticationTokenVersion'] ??
null
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Abstract class to define pages for the web installer.
endForm( $continue='continue', $back='back')
getVar( $var, $default=null)
const CONN_CREATE_DATABASE
A connection for creating DBs, suitable for pre-installation.