Jelajahi Sumber

After removing domain name from the default recordings dir path need to add the domain name every where the recordings directory is currently used.

markjcrane 9 tahun lalu
induk
melakukan
2b112f3961

+ 1 - 1
core/domain_settings/domain_delete.php

@@ -176,7 +176,7 @@ if (strlen($id) > 0) {
 
 		//delete the recordings
 			if (strlen($_SESSION['switch'][recordings]['dir']) > 0) {
-				system('rm -rf '.$_SESSION['switch']['recordings']['dir'].'/'.$domain_name);
+				system('rm -rf '.$_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$domain_name);
 			}
 
 		//delete voicemail

+ 2 - 2
core/domain_settings/domain_edit.php

@@ -234,8 +234,8 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
 						}
 
 					// rename switch/recordings/[domain] (folder)
-						if ( isset($_SESSION['switch']['recordings']['dir']) ) {
-							$switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']);
+						if ( isset($_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']) ) {
+							$switch_recordings_dir = str_replace("/".$_SESSION["domain_name"], "", $_SESSION['switch']['recordings']['dir']."/".$_SESSION['domain_name']);
 							if ( file_exists($switch_recordings_dir."/".$original_domain_name) ) {
 								@rename($switch_recordings_dir."/".$original_domain_name, $switch_recordings_dir."/".$domain_name); // folder
 							}