Add reloadacl and flush cache

This commit is contained in:
markjcrane
2020-07-23 19:57:07 +00:00
parent 0fcd5a7eef
commit 8c8d07f10c

View File

@@ -103,8 +103,19 @@
break;
}
//redirect the user
//clear the cache, reloadacl and redirect the user
if (in_array($_POST['action'], array('copy', 'delete', 'toggle'))) {
//clear the cache
$cache = new cache;
$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
header('Location: access_control_edit.php?id='.$id);
exit;
}
@@ -162,6 +173,16 @@
$database->app_uuid = '1416a250-f6e1-4edc-91a6-5c9b883638fd';
$database->save($array);
//clear the cache
$cache = new cache;
$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
if (isset($action)) {
if ($action == "add") {