pass database object to settings object (#7178)

Use the singleton database object with database::new syntax
Pass the connected database object to the settings object so settings object does not have to create another connection
This commit is contained in:
frytimo 2024-11-09 21:29:22 -04:00 committed by GitHub
parent fca029b7df
commit 773ecc96cc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ $sql .= "where fax_email_connection_host <> '' ";
$sql .= "and f.domain_uuid = d.domain_uuid "; $sql .= "and f.domain_uuid = d.domain_uuid ";
$sql .= "and fax_email_connection_host is not null "; $sql .= "and fax_email_connection_host is not null ";
$sql .= "and fax_email_outbound_subject_tag is not null "; $sql .= "and fax_email_outbound_subject_tag is not null ";
$database = new database; $database = database::new();
$result = $database->select($sql, null, 'all'); $result = $database->select($sql, null, 'all');
unset($sql); unset($sql);
@ -80,7 +80,7 @@ if (!empty($result) && @sizeof($result) != 0) {
$fax_toll_allow = $row["fax_toll_allow"]; $fax_toll_allow = $row["fax_toll_allow"];
//get event socket connection parameters //get event socket connection parameters
$setting = new settings(["domain_uuid" => $domain_uuid]); $setting = new settings(["database" => $database, "domain_uuid" => $domain_uuid]);
//send the domain name to the command line output //send the domain name to the command line output
if (!empty($fax_email_connection_host) && !empty($fax_email_connection_username)) { if (!empty($fax_email_connection_host) && !empty($fax_email_connection_username)) {