Update pdo.php

Replace dbissecure with db_secure variable as this approach is more concise.
This commit is contained in:
FusionPBX 2020-10-31 11:44:20 -06:00 committed by GitHub
parent 764091e2fb
commit a7e12aa5da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 6 deletions

View File

@ -246,15 +246,12 @@ if ($db_type == "mysql") {
if ($db_type == "pgsql") {
//database connection
try {
if (isset($db_secure)) {
$dbissecure = $db_secure;
}
else {
$dbissecure = false;
if (!isset($db_secure)) {
$db_secure = false;
}
if (strlen($db_host) > 0) {
if (strlen($db_port) == 0) { $db_port = "5432"; }
if ($dbissecure == true) {
if ($db_secure == true) {
$db = new PDO("pgsql:host=$db_host port=$db_port dbname=$db_name user=$db_username password=$db_password sslmode=verify-ca sslrootcert=$db_cert_authority");
}
else {