Update xml_cdr.php

This commit is contained in:
FusionPBX 2019-09-03 23:01:19 -06:00 committed by GitHub
parent dfea976aec
commit 811b53fd47
1 changed files with 8 additions and 4 deletions

View File

@ -435,13 +435,16 @@ if (!class_exists('xml_cdr')) {
if (strlen($domain_uuid) == 0) { if (strlen($domain_uuid) == 0) {
$sql = "select domain_uuid from v_domains "; $sql = "select domain_uuid from v_domains ";
if (strlen($domain_name) == 0 && $context != 'public' && $context != 'default') { if (strlen($domain_name) == 0 && $context != 'public' && $context != 'default') {
$sql .= "where domain_name = '".$context."' "; $sql .= "where domain_name = :context ";
$parameters['context'] = $context;
} }
else { else {
$sql .= "where domain_name = '".$domain_name."' "; $sql .= "where domain_name = :domain_name ";
$parameters['domain_name'] = $domain_name;
} }
$row = $this->db->query($sql)->fetch(); $database = new database;
$domain_uuid = $row['domain_uuid']; $domain_uuid = $database->select($sql, $parameters, 'column');
unset($parameters);
} }
//set values in the database //set values in the database
@ -1151,4 +1154,5 @@ if (!class_exists('xml_cdr')) {
$cdr = new xml_cdr; $cdr = new xml_cdr;
$cdr->read_files(); $cdr->read_files();
*/ */
?> ?>