32 if ( $this->
getVar(
'_ExistingDBSettings' ) ) {
36 $r = $this->parent->request;
37 if ( $r->wasPosted() ) {
40 if ( $status->isGood() ) {
41 $this->
setVar(
'_UpgradeDone',
false );
45 $this->parent->showStatusBox( $status );
51 $types =
"<ul class=\"config-settings-block\">\n";
53 $defaultType = $this->
getVar(
'wgDBtype' );
58 $dbSupport .=
wfMessage(
"config-dbsupport-$type" )->plain() .
"\n";
60 $this->
addHTML( $this->parent->getInfoBox(
61 wfMessage(
'config-support-info', trim( $dbSupport ) )->plain() ) );
65 $compiledDBs = $this->parent->getCompiledDBs();
66 if ( !in_array( $defaultType, $compiledDBs ) ) {
67 $defaultType = $compiledDBs[0];
70 foreach ( $compiledDBs as $type ) {
71 $installer = $this->parent->getDBInstaller( $type );
75 $installer->getReadableName(),
79 $type == $defaultType,
80 [
'class' =>
'dbRadio',
'rel' =>
"DB_wrapper_$type" ]
85 $settings .= Html::openElement(
88 'id' =>
'DB_wrapper_' . $type,
89 'class' =>
'dbWrapper'
92 Html::element(
'h3', [],
wfMessage(
'config-header-' . $type )->text() ) .
93 $installer->getConnectForm() .
97 $types .=
"</ul><br style=\"clear: left\"/>\n";
99 $this->
addHTML( $this->parent->label(
'config-db-type',
false, $types ) . $settings );
109 $r = $this->parent->request;
110 $type = $r->getVal(
'DBType' );
112 return Status::newFatal(
'config-invalid-db-type' );
114 $this->
setVar(
'wgDBtype', $type );
115 $installer = $this->parent->getDBInstaller( $type );
117 return Status::newFatal(
'config-invalid-db-type' );
120 return $installer->submitConnectForm();
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
static getDBTypes()
Get a list of known DB types.
Abstract class to define pages for the web installer.
endForm( $continue='continue', $back='back')
getVar( $var, $default=null)
static radioLabel( $label, $name, $value, $id, $checked=false, $attribs=[])
Convenience function to build an HTML radio button with a label.