Fix cache delete for global dialplans
This commit is contained in:
parent
704a1eb5e5
commit
6770d15b3c
|
|
@ -267,6 +267,9 @@
|
||||||
|
|
||||||
//clear the cache
|
//clear the cache
|
||||||
$cache = new cache;
|
$cache = new cache;
|
||||||
|
if ($dialplan_context == "\${domain_name}") {
|
||||||
|
$dialplan_context = "*";
|
||||||
|
}
|
||||||
$cache->delete("dialplan:".$dialplan_context);
|
$cache->delete("dialplan:".$dialplan_context);
|
||||||
|
|
||||||
//set the message
|
//set the message
|
||||||
|
|
|
||||||
|
|
@ -145,11 +145,13 @@ class cache {
|
||||||
event_socket_request($fp, $event);
|
event_socket_request($fp, $event);
|
||||||
|
|
||||||
//remove the local files
|
//remove the local files
|
||||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key)) {
|
foreach (glob($_SESSION['cache']['location']['text'] . "/" . $key) as $file) {
|
||||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key);
|
if (file_exists($file)) {
|
||||||
}
|
unlink($file);
|
||||||
if (file_exists($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp")) {
|
}
|
||||||
unlink($_SESSION['cache']['location']['text'] . "/" . $key . ".tmp");
|
if (file_exists($file)) {
|
||||||
|
unlink($file . ".tmp");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue