From 3a77c5dfe2278018a577f5d155de5ede301559cd Mon Sep 17 00:00:00 2001 From: Nate Jones Date: Tue, 28 Apr 2015 19:10:52 +0000 Subject: [PATCH] Phrases: Remove phrase from memcache if phrase detail deleted. --- app/phrases/phrase_detail_delete.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/phrases/phrase_detail_delete.php b/app/phrases/phrase_detail_delete.php index e8bf123580..32d51260b3 100644 --- a/app/phrases/phrase_detail_delete.php +++ b/app/phrases/phrase_detail_delete.php @@ -54,7 +54,15 @@ else { unset($sql); } -save_phrases_xml(); +//save the xml to the file system if the phrase directory is set + save_phrases_xml(); + +//delete the phrase 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 languages:".$phrase_language; + $switch_result = event_socket_request($fp, 'api '.$switch_cmd); + } //redirect the user $_SESSION['message'] = $text['message-delete'];