Update xml_cdr.php
This commit is contained in:
parent
bfc548b5ce
commit
50d7e33fbd
|
|
@ -257,21 +257,23 @@ if (!class_exists('xml_cdr')) {
|
||||||
$uuid = urldecode($xml->variables->uuid);
|
$uuid = urldecode($xml->variables->uuid);
|
||||||
if($uuid != null && is_uuid($uuid)) {
|
if($uuid != null && is_uuid($uuid)) {
|
||||||
//Check in the database
|
//Check in the database
|
||||||
|
$sql = "select count(xml_cdr_uuid) ";
|
||||||
|
$sql .= "from v_xml_cdr ";
|
||||||
|
$sql .= "where xml_cdr_uuid = :xml_cdr_uuid ";
|
||||||
|
$parameters['xml_cdr_uuid'] = $uuid;
|
||||||
$database = new database;
|
$database = new database;
|
||||||
$database->table = "v_xml_cdr";
|
$count = $database->select($sql, $parameters, 'column');
|
||||||
$where[1]["name"] = "xml_cdr_uuid";
|
unset($parameters);
|
||||||
$where[1]["operator"] = "=";
|
if ($count > 0) {
|
||||||
$where[1]["value"] = $uuid;
|
|
||||||
$database->where = $where;
|
|
||||||
$result = $database->count();
|
|
||||||
if ($result > 0) {
|
|
||||||
$duplicate_uuid = true;
|
$duplicate_uuid = true;
|
||||||
}
|
}
|
||||||
unset($where,$result,$database);
|
unset($database);
|
||||||
//Check in the array
|
//Check in the array
|
||||||
if (isset($this->array)) foreach ($this->array as $row) {
|
if (isset($this->array)) {
|
||||||
if (in_array($uuid,$row,true))
|
foreach ($this->array as $row) {
|
||||||
$duplicate_uuid = true;
|
if (in_array($uuid,$row,true))
|
||||||
|
$duplicate_uuid = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue