This commit is contained in:
markjcrane 2015-09-09 10:02:43 -06:00
commit 83e5fe35c0
1 changed files with 6 additions and 4 deletions

View File

@ -136,15 +136,17 @@ include "root.php";
//update the extension
$sql = "update v_extensions set ";
if (strlen($this->forward_all_destination) == 0) {
$sql .= "forward_all_destination = null, ";
}
else {
$sql .= "forward_all_destination = '$this->forward_all_destination', ";
}
if (strlen($this->forward_all_destination) == 0 || $this->forward_all_enabled == "false") {
if (strlen($this->forward_all_destination) == 0) {
$sql .= "forward_all_destination = null, ";
}
$sql .= "dial_string = null, ";
$sql .= "forward_all_enabled = 'false' ";
}
else {
$sql .= "forward_all_destination = '$this->forward_all_destination', ";
$sql .= "dial_string = '".check_str($this->dial_string)."', ";
$sql .= "forward_all_enabled = 'true' ";
}