mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
parent
2e1c1da927
commit
eafb066024
@ -46,24 +46,13 @@ class DbResourceForm extends Form
|
||||
$encryptionChoices = array();
|
||||
$offerPostgres = false;
|
||||
$offerMysql = false;
|
||||
if (isset($formData['db'])) {
|
||||
if ($formData['db'] === 'pgsql') {
|
||||
$offerPostgres = true;
|
||||
} elseif ($formData['db'] === 'mysql') {
|
||||
$offerMysql = true;
|
||||
if (version_compare(Platform::getPhpVersion(), '5.4.0', '>=')) {
|
||||
$encryptionChoices['ssl'] = 'SSL';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$dbChoice = key($dbChoices);
|
||||
if ($dbChoice === 'pgsql') {
|
||||
$offerPostgres = true;
|
||||
} elseif ($dbChoice === 'mysql') {
|
||||
$offerMysql = true;
|
||||
if (version_compare(Platform::getPhpVersion(), '5.4.0', '>=')) {
|
||||
$encryptionChoices['ssl'] = 'SSL';
|
||||
}
|
||||
$dbChoice = isset($formData['db']) ? $formData['db'] : key($dbChoices);
|
||||
if ($dbChoice === 'pgsql') {
|
||||
$offerPostgres = true;
|
||||
} elseif ($dbChoice === 'mysql') {
|
||||
$offerMysql = true;
|
||||
if (version_compare(Platform::getPhpVersion(), '5.4.0', '>=')) {
|
||||
$encryptionChoices['ssl'] = 'SSL';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user