Flush cache after updating word replacements CRM-12229
authorColeman Watts <coleman@civicrm.org>
Wed, 27 Mar 2013 18:12:18 +0000 (11:12 -0700)
committerColeman Watts <coleman@civicrm.org>
Thu, 28 Mar 2013 00:27:52 +0000 (17:27 -0700)
CRM/Admin/Form/WordReplacements.php
CRM/Core/Resources.php

index fc6938895ff4f241378a0cd37d46a240a5c7c44a..9ab0e22cd24c7115c8459d36f6627672c15906fd 100644 (file)
@@ -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',
index 629f0c3df0fcffa7ad7355c15bf5191df0b6333a..005b5ea9c627d80b84b9adbda769fe37ddf99597 100644 (file)
@@ -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
    *