From 627668e86dd7a183222db67e221ede3cdb0e4faa Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 27 Mar 2013 11:12:18 -0700 Subject: [PATCH] Flush cache after updating word replacements CRM-12229 --- CRM/Admin/Form/WordReplacements.php | 4 +++- CRM/Core/Resources.php | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Admin/Form/WordReplacements.php b/CRM/Admin/Form/WordReplacements.php index fc6938895f..9ab0e22cd2 100644 --- a/CRM/Admin/Form/WordReplacements.php +++ b/CRM/Admin/Form/WordReplacements.php @@ -256,8 +256,10 @@ class CRM_Admin_Form_WordReplacements extends CRM_Core_Form { $wordReplacementSettings = CRM_Core_BAO_Domain::edit($params, $id); if ($wordReplacementSettings) { - //reset navigation + // Reset navigation CRM_Core_BAO_Navigation::resetNavigation(); + // Clear js string cache + CRM_Core_Resources::singleton()->flushStrings(); CRM_Core_Session::setStatus("", ts("Settings Saved"), "success"); CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/options/wordreplacements', diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index 629f0c3df0..005b5ea9c6 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -477,6 +477,13 @@ class CRM_Core_Resources { return $this; } + /** + * Flushes cached translated strings + */ + public function flushStrings() { + $this->cache->flush(); + } + /** * Translate strings in a javascript file * -- 2.25.1