Fix. Display recording in CDR

This commit is contained in:
Alexey Melnichuk
2015-12-11 10:46:51 +03:00
parent daa0f9bb70
commit d260964e8d

View File

@@ -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'];