diff --git a/app/xml_cdr/xml_cdr.php b/app/xml_cdr/xml_cdr.php index e3e076edf9..ab7e5cbf6d 100644 --- a/app/xml_cdr/xml_cdr.php +++ b/app/xml_cdr/xml_cdr.php @@ -368,12 +368,7 @@ else { $database = new database; } - if (count($_SESSION['domains']) == 1) { // add to path if single-tenant - $path_mod = $_SESSION["domain_name"]; - } - else { - $path_mod = ""; - } + $path_mod = $_SESSION["domain_name"]; if ($result_count > 0) { foreach($result as $index => $row) { $tmp_year = date("Y", strtotime($row['start_stamp'])); @@ -396,7 +391,7 @@ else { //handle recordings if (permission_exists('recording_play') || permission_exists('recording_download')) { - $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; + $tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day; $tmp_name = ''; if(!empty($row['recording_file']) && file_exists($row['recording_file'])){ $tmp_name=$row['recording_file'];