Fix the string quotations and return on the method.

This commit is contained in:
Mark Crane
2015-01-15 19:33:27 +00:00
parent 59822e6091
commit 495f4a0226
3 changed files with 8 additions and 11 deletions

View File

@@ -361,12 +361,9 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//synchronize the xml config
save_dialplan_xml();
//clear memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete dialplan:".$destination_context;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//clear the cache
$cache = new cache;
$cache->delete("dialplan:".$destination_context);
} //add or update the dialplan if the destination number is set

View File

@@ -155,7 +155,7 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) {
//clear the cache
$cache = new cache;
$cache->delete('dialplan:".$dialplan_context');
$cache->delete("dialplan:".$dialplan_context);
//synchronize the xml config
save_dialplan_xml();

View File

@@ -39,7 +39,7 @@ class cache {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$command = "memcache set ".$key." ".$value;
$return = event_socket_request($fp, 'api '.$command);
return event_socket_request($fp, 'api '.$command);
}
else {
return false;
@@ -57,7 +57,7 @@ class cache {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$command = "memcache get ".$key;
$return = event_socket_request($fp, 'api '.$command);
return event_socket_request($fp, 'api '.$command);
}
else {
return false;
@@ -75,7 +75,7 @@ class cache {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$command = "memcache delete ".$key;
$return = event_socket_request($fp, 'api '.$command);
return event_socket_request($fp, 'api '.$command);
}
else {
return false;
@@ -92,7 +92,7 @@ class cache {
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$command = "memcache flush";
$return = event_socket_request($fp, 'api '.$command);
return event_socket_request($fp, 'api '.$command);
}
else {
return false;