Browse Source

Fix the domain name in the path for the inbound fax dialplan.

markjcrane 9 years ago
parent
commit
531edcd6fc
1 changed files with 4 additions and 14 deletions
  1. 4 14
      resources/classes/fax.php

+ 4 - 14
resources/classes/fax.php

@@ -17,7 +17,7 @@
 
 	The Initial Developer of the Original Code is
 	Mark J Crane <[email protected]>
-	Copyright (C) 2010
+	Copyright (C) 2010-2015
 	All Rights Reserved.
 
 	Contributor(s):
@@ -89,6 +89,7 @@ include "root.php";
 
 			//add the fax
 				if (strlen($this->fax_extension) > 0) {
+
 					//add the dialplan
 						$database = new database;
 						$database->table = "v_dialplans";
@@ -190,12 +191,7 @@ include "root.php";
 						$database->fields['dialplan_detail_uuid'] = uuid();
 						$database->fields['dialplan_detail_tag'] = 'action'; //condition, action, antiaction
 						$database->fields['dialplan_detail_type'] = 'rxfax';
-						if (count($_SESSION["domains"]) > 1) {
-							$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domains'][$row['domain_uuid']]['domain_name'].'/'.$this->fax_extension.'/inbox/${last_fax}.tif';
-						}
-						else {
-							$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$this->fax_extension.'/inbox/${last_fax}.tif';
-						}
+						$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domains'][$this->domain_uuid]['domain_name'].'/'.$this->fax_extension.'/inbox/${last_fax}.tif';
 						$database->fields['dialplan_detail_data'] = $dialplan_detail_data;
 						$database->fields['dialplan_detail_order'] = '040';
 						$database->add();
@@ -322,7 +318,6 @@ include "root.php";
 							$database->update();
 						}
 						else {
-//							$this->dialplan_uuid = uuid();
 							$database->fields['domain_uuid'] = $this->domain_uuid;
 							$database->fields['dialplan_uuid'] = $this->dialplan_uuid;
 							$database->add();
@@ -427,12 +422,7 @@ include "root.php";
 						$database->fields['dialplan_detail_uuid'] = uuid();
 						$database->fields['dialplan_detail_tag'] = 'action'; //condition, action, antiaction
 						$database->fields['dialplan_detail_type'] = 'rxfax';
-						if (count($_SESSION["domains"]) > 1) {
-							$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domains'][$row['domain_uuid']]['domain_name'].'/'.$this->fax_extension.'/inbox/${last_fax}.tif';
-						}
-						else {
-							$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$this->fax_extension.'/inbox/${last_fax}.tif';
-						}
+						$dialplan_detail_data = $_SESSION['switch']['storage']['dir'].'/fax/'.$_SESSION['domains'][$this->domain_uuid]['domain_name'].'/'.$this->fax_extension.'/inbox/${last_fax}.tif';
 						$database->fields['dialplan_detail_data'] = $dialplan_detail_data;
 						$database->fields['dialplan_detail_order'] = '040';
 						$database->add();