Update access_control_node_delete.php

This commit is contained in:
FusionPBX 2017-07-04 11:38:28 -06:00 committed by GitHub
parent abaa85baf8
commit 7baedc7561
1 changed files with 7 additions and 3 deletions

View File

@ -19,13 +19,13 @@
$text = $language->get(); $text = $language->get();
//get the id //get the id
if (count($_GET)>0) { if (count($_GET) > 0) {
$id = check_str($_GET["id"]); $id = check_str($_GET["id"]);
$access_control_uuid = check_str($_GET["access_control_uuid"]); $access_control_uuid = check_str($_GET["access_control_uuid"]);
} }
//delete access_control_node //delete access_control_node
if (strlen($id)>0) { if (strlen($id) > 0) {
//update the database //update the database
$sql = "delete from v_access_control_nodes "; $sql = "delete from v_access_control_nodes ";
$sql .= "where access_control_node_uuid = '$id' "; $sql .= "where access_control_node_uuid = '$id' ";
@ -36,9 +36,13 @@
//clear the cache //clear the cache
$cache = new cache; $cache = new cache;
$cache->delete("configuration:acl.conf"); $cache->delete("configuration:acl.conf");
//create the event socket connection
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) { event_socket_request($fp, "api reloadacl"); }
} }
//redirect the user //redirect the browser
messages::add($text['message-delete']); messages::add($text['message-delete']);
header('Location: access_control_edit.php?id='.$access_control_uuid); header('Location: access_control_edit.php?id='.$access_control_uuid);