Update the memcache reference to use the new cache PHP class.

This commit is contained in:
Mark Crane
2015-01-16 00:21:02 +00:00
parent 618626e97a
commit 91bfa85bac
32 changed files with 207 additions and 231 deletions

View File

@@ -13,11 +13,11 @@
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2008-2012
Portions created by the Initial Developer are Copyright (C) 2008-2015
the Initial Developer. All Rights Reserved.
Contributor(s):
@@ -158,7 +158,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
return;
} //if ($action == "add")
if ($action == "update") {
if ($action == "update") {
$sql = " select c.call_block_number, d.domain_name from v_call_block as c ";
$sql .= "JOIN v_domains as d ON c.domain_uuid=d.domain_uuid ";
$sql .= "where c.domain_uuid = '".$_SESSION['domain_uuid']."' ";
@@ -172,12 +172,9 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
$call_block_number = $result[0]["call_block_number"];
$domain_name = $result[0]["domain_name"];
//delete extension from memcache
$fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
if ($fp) {
$switch_cmd = "memcache delete app:call_block:".$domain_name.":".$call_block_number;
$switch_result = event_socket_request($fp, 'api '.$switch_cmd);
}
//clear the cache
$cache = new cache;
$cache->delete("app:call_block:".$domain_name.":".$call_block_number);
}
unset ($prep_statement, $sql);