Allow to create MSSQL and Oracle resources

refs #9683
This commit is contained in:
Eric Lippmann 2015-09-07 16:44:35 +02:00
parent e64ad87745
commit 56bef276e0

View File

@ -27,13 +27,23 @@ class DbResourceForm extends Form
public function createElements(array $formData) public function createElements(array $formData)
{ {
$dbChoices = array(); $dbChoices = array();
if (Platform::hasMssqlSupport()) {
$dbChoices['mssql'] = 'MSSQL';
}
if (Platform::hasMysqlSupport()) { if (Platform::hasMysqlSupport()) {
$dbChoices['mysql'] = 'MySQL'; $dbChoices['mysql'] = 'MySQL';
} }
if (Platform::hasOciSupport()) {
$dbChoices['oci'] = 'Oracle (OCI8)';
}
if (Platform::hasOracleSupport()) {
$dbChoices['oracle'] = 'Oracle';
}
if (Platform::hasPostgresqlSupport()) { if (Platform::hasPostgresqlSupport()) {
$dbChoices['pgsql'] = 'PostgreSQL'; $dbChoices['pgsql'] = 'PostgreSQL';
} }
$this->addElement( $this->addElement(
'text', 'text',
'name', 'name',