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

@ -246,6 +246,10 @@
$array['follow_me'][] = $follow_me; $array['follow_me'][] = $follow_me;
} }
//add the dialplan permission
$p = new permissions;
$p->add("extension_edit", "temp");
//save the data //save the data
$database = new database; $database = new database;
$database->app_name = 'call_routing'; $database->app_name = 'call_routing';
@ -253,6 +257,9 @@
$database->save($array); $database->save($array);
//$message = $database->message; //$message = $database->message;
//remove the temporary permission
$p->delete("extension_edit", "temp");
//delete empty destination records //delete empty destination records
if (is_array($follow_me_delete_uuids) && sizeof($follow_me_delete_uuids) > 0) { 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)."') "; $sql = "delete from v_follow_me_destinations where follow_me_destination_uuid in ('".implode("','", $follow_me_delete_uuids)."') ";