mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Fix. Clear the cache when callcenter config changed.
This commit is contained in:
@@ -86,6 +86,7 @@ if (count($_GET)>0) {
|
||||
|
||||
//synchronize configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//redirect the browser
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
|
||||
@@ -264,6 +264,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//syncrhonize configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
$_SESSION["message"] = $text['message-add'];
|
||||
header("Location: call_center_agents.php");
|
||||
@@ -291,7 +292,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
unset($sql);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_call_center_xml();
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
$_SESSION["message"] = $text['message-update'];
|
||||
header("Location: call_center_agents.php");
|
||||
|
||||
@@ -87,9 +87,11 @@ if (strlen($id) > 0) {
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
$cache->delete("dialplan:".$_SESSION["context"]);
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//synchronize configuration
|
||||
save_dialplan_xml();
|
||||
save_call_center_xml();
|
||||
|
||||
//apply settings reminder
|
||||
$_SESSION["reload_xml"] = true;
|
||||
|
||||
@@ -257,6 +257,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//syncrhonize the configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//delete the dialplan context from memcache
|
||||
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
|
||||
@@ -326,6 +327,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//synchronize the configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
@@ -393,6 +395,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
//syncrhonize configuration
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
}
|
||||
|
||||
//redirect
|
||||
|
||||
@@ -111,7 +111,8 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
unset($sql);
|
||||
|
||||
//syncrhonize configuration
|
||||
save_call_center_xml();
|
||||
save_call_center_xml();
|
||||
remove_config_from_cache('configuration:callcenter.conf');
|
||||
|
||||
//look up queue uuid by queue name (ugh)
|
||||
$sql = "select call_center_queue_uuid from v_call_center_queues where queue_name = '".$queue_name."'";
|
||||
|
||||
@@ -158,6 +158,15 @@ function byte_convert($bytes, $decimals = 2) {
|
||||
return $formattedbytes;
|
||||
}
|
||||
|
||||
function remove_config_from_cache($name) {
|
||||
$cache = new cache;
|
||||
$cache->delete($name);
|
||||
$hostname = trim(event_socket_request_cmd('api switchname'));
|
||||
if($hostname){
|
||||
$cache->delete($name . ':' . $hostname);
|
||||
}
|
||||
}
|
||||
|
||||
function ListFiles($dir) {
|
||||
if($dh = opendir($dir)) {
|
||||
$files = Array();
|
||||
|
||||
Reference in New Issue
Block a user