26 if ( $vars[
'wgUpgradeKey'] !==
false
27 && $this->
getVar(
'_UpgradeKeySupplied' )
28 && $this->
getVar(
'wgUpgradeKey' ) === $vars[
'wgUpgradeKey']
32 if ( $status->isOK() ) {
36 $this->parent->showStatusBox( $status );
44 if ( $vars[
'wgUpgradeKey'] ===
false ) {
45 $this->
setVar(
'_UpgradeKeySupplied',
true );
47 $this->
addHTML( $this->parent->getInfoBox(
48 wfMessage(
'config-upgrade-key-missing',
"<pre dir=\"ltr\">\$wgUpgradeKey = '" .
49 $this->
getVar(
'wgUpgradeKey' ) .
"';</pre>" )->plain()
58 $r = $this->parent->request;
59 if ( $r->wasPosted() ) {
60 $key = $r->getText(
'config_wgUpgradeKey' );
61 if ( !$key || $key !== $vars[
'wgUpgradeKey'] ) {
62 $this->parent->showError(
'config-localsettings-badkey' );
69 if ( $status->isOK() ) {
72 $this->parent->showStatusBox( $status );
90 $this->parent->getInfoBox(
wfMessage(
'config-localsettings-upgrade' )->plain() ) .
92 $this->parent->getTextBox( [
93 'var' =>
'wgUpgradeKey',
95 'label' =>
'config-localsettings-key',
96 'attribs' => [
'autocomplete' =>
'off' ],
109 $status = Status::newGood();
110 foreach ( $names as $name ) {
111 if ( !isset( $vars[$name] ) ) {
112 $status->fatal(
'config-localsettings-incomplete', $name );
114 $this->
setVar( $name, $vars[$name] );
129 if ( !isset( $vars[
'wgDBtype'] ) ||
132 return Status::newFatal(
'config-localsettings-connection-error',
'' );
136 $requiredVars = [
'wgDBtype' ];
138 $installer = $this->parent->getDBInstaller();
139 $status->merge( $this->
importVariables( $installer->getGlobalNames(), $vars ) );
140 if ( !$status->isOK() ) {
144 $this->
setVar(
'_InstallUser', $vars[
'wgDBadminuser'] ?? $vars[
'wgDBuser'] );
145 $this->
setVar(
'_InstallPassword', $vars[
'wgDBadminpassword'] ?? $vars[
'wgDBpassword'] );
149 if ( !$status->isOK() ) {
151 $status->replaceMessage(
'config-connection-error',
152 'config-localsettings-connection-error' );
158 $this->
setVar(
'_ExistingDBSettings',
true );
161 $this->
setVar(
'wgAuthenticationTokenVersion',
162 $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.