Update call_edit.php

This commit is contained in:
FusionPBX 2018-04-05 10:23:27 -06:00 committed by GitHub
parent fd179c8417
commit 0871a792e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -113,10 +113,10 @@
unset ($prep_statement);
//process post vars
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//get http post variables and set them to php variables
if (count($_POST)>0) {
if (count($_POST) > 0) {
$forward_all_enabled = check_str($_POST["forward_all_enabled"]);
$forward_all_destination = check_str($_POST["forward_all_destination"]);
$forward_busy_enabled = check_str($_POST["forward_busy_enabled"]);
@ -246,6 +246,10 @@
$array['follow_me'][] = $follow_me;
}
//add the dialplan permission
$p = new permissions;
$p->add("extension_edit", "temp");
//save the data
$database = new database;
$database->app_name = 'call_routing';
@ -253,6 +257,9 @@
$database->save($array);
//$message = $database->message;
//remove the temporary permission
$p->delete("extension_edit", "temp");
//delete empty destination records
if (is_array($follow_me_delete_uuids) && sizeof($follow_me_delete_uuids) > 0) {
$sql = "delete from v_follow_me_destinations where follow_me_destination_uuid in ('".implode("','", $follow_me_delete_uuids)."') ";