mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
After removing domain name from the default recordings dir path need to add the domain name every where the recordings directory is currently used.
This commit is contained in:
@@ -219,7 +219,7 @@
|
||||
$database->fields['domain_name'] = $domain_name;
|
||||
|
||||
//check whether a recording exists
|
||||
$recording_relative_path = '/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$recording_relative_path = '/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].$recording_relative_path.'/'.$uuid.'.wav')) {
|
||||
$recording_file = $recording_relative_path.'/'.$uuid.'.wav';
|
||||
}
|
||||
|
||||
@@ -396,7 +396,7 @@ else {
|
||||
|
||||
//handle recordings
|
||||
if (permission_exists('recording_play') || permission_exists('recording_download')) {
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$path_mod.'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$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'];
|
||||
|
||||
@@ -54,8 +54,8 @@ if (sizeof($_REQUEST) > 0) {
|
||||
$prep_statement->execute();
|
||||
unset($sql, $prep_statement);
|
||||
//delete recording, if any
|
||||
if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]))) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir'].base64_decode($recording_file_path[$index]));
|
||||
if ($recording_file_path[$index] != '' && file_exists($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]))) {
|
||||
@unlink($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name'].base64_decode($recording_file_path[$index]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ else {
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$language."</td>\n";
|
||||
//echo " <td valign='top' class='".$row_style[$c]."'>".$context."</td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
//echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')."\">\n";
|
||||
//echo " </a>";
|
||||
|
||||
@@ -208,7 +208,7 @@ else {
|
||||
}
|
||||
echo " </td>\n";
|
||||
echo " <td valign='top' class='".$row_style[$c]."'>";
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
if (file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')) {
|
||||
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$uuid.'.wav')."\">\n";
|
||||
echo $caller_id_number.' ';
|
||||
echo " </a>";
|
||||
@@ -276,7 +276,7 @@ else {
|
||||
if ($key == "bridge_uuid" || $key == "signal_bond") {
|
||||
echo " <td valign='top' align='left' class='".$row_style[$c]."'>\n";
|
||||
echo " <a href='xml_cdr_details.php?uuid=$value'>".$value."</a> \n";
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_dir = $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day;
|
||||
$tmp_name = '';
|
||||
if (file_exists($tmp_dir.'/'.$value.'.wav')) {
|
||||
$tmp_name = $value.".wav";
|
||||
@@ -290,12 +290,12 @@ else {
|
||||
elseif (file_exists($tmp_dir.'/'.$value.'_1.mp3')) {
|
||||
$tmp_name = $value."_1.mp3";
|
||||
}
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
echo " <a href=\"javascript:void(0);\" onclick=\"window.open('../recordings/v_recording_play.php?a=download&type=moh&filename=".base64_encode('archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)."', 'play',' width=420,height=150,menubar=no,status=no,toolbar=no')\">\n";
|
||||
echo " play";
|
||||
echo " </a> ";
|
||||
}
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
if (strlen($tmp_name) > 0 && file_exists($_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/archive/'.$tmp_year.'/'.$tmp_month.'/'.$tmp_day.'/'.$tmp_name)) {
|
||||
echo " <a href=\"../recordings/v_recordings.php?a=download&type=rec&t=bin&filename=".base64_encode("archive/".$tmp_year."/".$tmp_month."/".$tmp_day."/".$tmp_name)."\">\n";
|
||||
echo " download";
|
||||
echo " </a>";
|
||||
|
||||
Reference in New Issue
Block a user