From 49e8222219c221070b8557cdb7b424d9fa14132c Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 8 Dec 2022 22:12:22 -0700 Subject: [PATCH] Clear the speed_dial cache. --- app/contacts/contact_edit.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/contacts/contact_edit.php b/app/contacts/contact_edit.php index b052ddf1ee..808f5d964b 100644 --- a/app/contacts/contact_edit.php +++ b/app/contacts/contact_edit.php @@ -317,6 +317,7 @@ if (is_array($contact_phones)) { foreach ($contact_phones as $row) { if (strlen($row['phone_number']) > 0) { + //add the speed dial $array['contacts'][0]['contact_phones'][$y]['domain_uuid'] = $_SESSION['domain_uuid']; $array['contacts'][0]['contact_phones'][$y]['contact_uuid'] = $contact_uuid; $array['contacts'][0]['contact_phones'][$y]['contact_phone_uuid'] = $row["contact_phone_uuid"]; @@ -331,6 +332,14 @@ $array['contacts'][0]['contact_phones'][$y]['phone_extension'] = $row["phone_extension"]; $array['contacts'][0]['contact_phones'][$y]['phone_primary'] = $row["phone_primary"]; $array['contacts'][0]['contact_phones'][$y]['phone_description'] = $row["phone_description"]; + + //clear the cache + if ($row["phone_speed_dial"] != '') { + $cache = new cache; + $cache->delete("app.dialplan.speed_dial.".$row["phone_speed_dial"]."@".$_SESSION['domain_name']); + } + + //increment the row id $y++; } }