Update pdo.php
Replace dbissecure with db_secure variable as this approach is more concise.
This commit is contained in:
parent
764091e2fb
commit
a7e12aa5da
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue