*/
protected $settings;
+
+ /**
+ * List of detected DBs, access using getCompiledDBs().
+ *
+ * @var array
+ */
+ protected $compiledDBs;
+
/**
* Cached DB installer instances, access using getDBInstaller().
*
protected $internalDefaults = array(
'_UserLang' => 'en',
'_Environment' => false,
- '_CompiledDBs' => array(),
'_SafeMode' => false,
'_RaiseMemory' => false,
'_UpgradeDone' => false,
}
}
}
- $this->setVar( '_CompiledDBs', $compiledDBs );
+ $this->compiledDBs = $compiledDBs;
$this->parserTitle = Title::newFromText( 'Installer' );
$this->parserOptions = new ParserOptions; // language will be wrong :(
}
}
+ /**
+ * Get a list of DBs supported by current PHP setup
+ *
+ * @return array
+ */
+ public function getCompiledDBs() {
+ return $this->compiledDBs;
+ }
+
/**
* Get an instance of DatabaseInstaller for the specified DB type.
*
$allNames[] = wfMessage( "config-type-$name" )->text();
}
- // cache initially available databases to make sure that everything will be displayed correctly
- // after a refresh on env checks page
- $databases = $this->getVar( '_CompiledDBs-preFilter' );
- if ( !$databases ) {
- $databases = $this->getVar( '_CompiledDBs' );
- $this->setVar( '_CompiledDBs-preFilter', $databases );
- }
+ $databases = $this->getCompiledDBs();
$databases = array_flip ( $databases );
foreach ( array_keys( $databases ) as $db ) {
// @todo FIXME: This only works for the web installer!
return false;
}
- $this->setVar( '_CompiledDBs', $databases );
return true;
}
// It's possible that the library for the default DB type is not compiled in.
// In that case, instead select the first supported DB type in the list.
- $compiledDBs = $this->parent->getVar( '_CompiledDBs' );
+ $compiledDBs = $this->parent->getCompiledDBs();
if ( !in_array( $defaultType, $compiledDBs ) ) {
$defaultType = $compiledDBs[0];
}