Change prefix from tmp_ to start_ as the variable is based on the start date.

This commit is contained in:
FusionPBX 2020-08-11 10:39:27 -06:00 committed by GitHub
parent 7d29984f3d
commit 1abd1f1670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 9 deletions

View File

@ -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);
}