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