From 1abd1f16706c58dbe675b0350c4bfe0aeab2def3 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 11 Aug 2020 10:39:27 -0600 Subject: [PATCH] Change prefix from tmp_ to start_ as the variable is based on the start date. --- app/xml_cdr/resources/classes/xml_cdr.php | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/app/xml_cdr/resources/classes/xml_cdr.php b/app/xml_cdr/resources/classes/xml_cdr.php index 681ea66d60..840a17800e 100644 --- a/app/xml_cdr/resources/classes/xml_cdr.php +++ b/app/xml_cdr/resources/classes/xml_cdr.php @@ -421,10 +421,10 @@ if (!class_exists('xml_cdr')) { $this->array[$key]['pdd_ms'] = urldecode($xml->variables->progress_mediamsec) + urldecode($xml->variables->progressmsec); //get break down the date to year, month and day - $tmp_time = strtotime($start_stamp); - $tmp_year = date("Y", $tmp_time); - $tmp_month = date("M", $tmp_time); - $tmp_day = date("d", $tmp_time); + $start_time = strtotime($start_stamp); + $start_year = date("Y", $start_time); + $start_month = date("M", $start_time); + $start_day = date("d", $start_time); //get the domain values from the xml $domain_name = urldecode($xml->variables->domain_name); @@ -721,11 +721,7 @@ if (!class_exists('xml_cdr')) { if ($_SESSION['cdr']['storage']['text'] == "dir" && $error != "true") { if (strlen($uuid) > 0) { - $tmp_time = strtotime($start_stamp); - $tmp_year = date("Y", $tmp_time); - $tmp_month = date("M", $tmp_time); - $tmp_day = date("d", $tmp_time); - $tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; + $tmp_dir = $_SESSION['switch']['log']['dir'].'/xml_cdr/archive/'.$start_year.'/'.$start_month.'/'.$start_day; if(!file_exists($tmp_dir)) { event_socket_mkdir($tmp_dir); }