From 8391e996f0757330c5c9696355448ebabe1304bf Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Wed, 9 Sep 2015 16:26:41 +0400 Subject: [PATCH] Fix. Allow change Call Forward number without enable it. --- app/calls/resources/classes/call_forward.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/calls/resources/classes/call_forward.php b/app/calls/resources/classes/call_forward.php index 74688572ed..3825ec3304 100644 --- a/app/calls/resources/classes/call_forward.php +++ b/app/calls/resources/classes/call_forward.php @@ -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' "; }