mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-03-20 15:32:15 +00:00
Fix a bug with follow me where disabling it didn't clear the dial string.
This commit is contained in:
@@ -35,7 +35,6 @@ include "root.php";
|
||||
public $forward_all_destination;
|
||||
public $forward_all_enabled;
|
||||
private $dial_string;
|
||||
private $dial_string_update = false;
|
||||
|
||||
public function set() {
|
||||
//set the global variable
|
||||
@@ -59,22 +58,14 @@ include "root.php";
|
||||
if (count($result) > 0) {
|
||||
foreach ($result as &$row) {
|
||||
$this->extension = $row["extension"];
|
||||
if ($this->forward_all_enabled == "false" && $row["forward_all_enabled"] == "true") {
|
||||
$this->dial_string_update = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset ($prep_statement);
|
||||
if ($this->forward_all_enabled == "true") {
|
||||
$this->dial_string_update = true;
|
||||
}
|
||||
|
||||
//update the extension
|
||||
$sql = "update v_extensions set ";
|
||||
$sql .= "forward_all_destination = '$this->forward_all_destination', ";
|
||||
if ($this->dial_string_update) {
|
||||
$sql .= "dial_string = '".$this->dial_string."', ";
|
||||
}
|
||||
$sql .= "dial_string = '".$this->dial_string."', ";
|
||||
$sql .= "forward_all_enabled = '$this->forward_all_enabled' ";
|
||||
$sql .= "where domain_uuid = '$this->domain_uuid' ";
|
||||
$sql .= "and extension_uuid = '$this->extension_uuid' ";
|
||||
@@ -91,10 +82,6 @@ include "root.php";
|
||||
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
|
||||
}
|
||||
|
||||
//syncrhonize configuration
|
||||
if ($this->dial_string_update) {
|
||||
save_extension_xml();
|
||||
}
|
||||
} //function
|
||||
} //class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user