28 if ( $this->getVar(
'_ExistingDBSettings' ) ) {
32 $r = $this->parent->request;
33 if ( $r->wasPosted() ) {
37 $this->setVar(
'_UpgradeDone',
false );
41 $this->parent->showStatusBox(
$status );
47 $types =
"<ul class=\"config-settings-block\">\n";
49 $defaultType = $this->getVar(
'wgDBtype' );
54 $dbSupport .=
wfMessage(
"config-dbsupport-$type" )->plain() .
"\n";
56 $this->addHTML( $this->parent->getInfoBox(
57 wfMessage(
'config-support-info', trim( $dbSupport ) )->plain() ) );
61 $compiledDBs = $this->parent->getCompiledDBs();
62 if ( !in_array( $defaultType, $compiledDBs ) ) {
63 $defaultType = $compiledDBs[0];
66 foreach ( $compiledDBs as
$type ) {
67 $installer = $this->parent->getDBInstaller(
$type );
71 $installer->getReadableName(),
75 $type == $defaultType,
76 [
'class' =>
'dbRadio',
'rel' =>
"DB_wrapper_$type" ]
81 $settings .= Html::openElement(
84 'id' =>
'DB_wrapper_' .
$type,
85 'class' =>
'dbWrapper'
88 Html::element(
'h3', [],
wfMessage(
'config-header-' .
$type )->text() ) .
89 $installer->getConnectForm() .
93 $types .=
"</ul><br style=\"clear: left\"/>\n";
95 $this->addHTML( $this->parent->label(
'config-db-type',
false, $types ) . $settings );
105 $r = $this->parent->request;
106 $type = $r->getVal(
'DBType' );
110 $this->setVar(
'wgDBtype',
$type );
111 $installer = $this->parent->getDBInstaller(
$type );
116 return $installer->submitConnectForm();