mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-03 18:33:49 +00:00
Merge pull request #5557 from greenbea/patch-16
Fix cache delete for global dialplans
This commit is contained in:
@@ -267,6 +267,9 @@
|
||||
|
||||
//clear the cache
|
||||
$cache = new cache;
|
||||
if ($dialplan_context == "\${domain_name}" or $dialplan_context == "global") {
|
||||
$dialplan_context = "*";
|
||||
}
|
||||
$cache->delete("dialplan:".$dialplan_context);
|
||||
|
||||
//set the message
|
||||
|
||||
@@ -145,11 +145,13 @@ class cache {
|
||||
event_socket_request($fp, $event);
|
||||
|
||||
//remove the local files
|
||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) {
|
||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key);
|
||||
}
|
||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) {
|
||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp");
|
||||
foreach (glob($_SESSION['cache']['location']['text'] . "/" . $key) as $file) {
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
if (file_exists($file)) {
|
||||
unlink($file . ".tmp");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user