CRM-14949 - Flush dynamic resources when clearing caches
authorColeman Watts <coleman@civicrm.org>
Wed, 9 Jul 2014 19:56:08 +0000 (20:56 +0100)
committerColeman Watts <coleman@civicrm.org>
Wed, 9 Jul 2014 20:17:38 +0000 (21:17 +0100)
CRM/Core/BAO/WordReplacement.php
CRM/Core/Invoke.php
CRM/Utils/File.php

index 14b6083a4cd7ea4faf004dc08d251ababe4e5df9..9da2ebf36a6bcb2872d7553dbcc91c1564a7e4fe 100644 (file)
@@ -207,6 +207,8 @@ WHERE  domain_id = %1
       CRM_Core_BAO_Navigation::resetNavigation();
       // Clear js string cache
       CRM_Core_Resources::singleton()->flushStrings();
+      // Clear dynamic js files which may contain localization
+      CRM_Utils_File::flushDynamicResources();
 
       return TRUE;
     }
index bd60f01405be44c90b01ccabd8ac6d0dd0cd552d..44936afb146bf8bf10450cde48c3abe86ac3ae89 100644 (file)
@@ -402,6 +402,9 @@ class CRM_Core_Invoke {
     // also rebuild word replacement cache
     CRM_Core_BAO_WordReplacement::rebuild();
 
+    // Clear dynamic js files
+    CRM_Utils_File::flushDynamicResources();
+
     CRM_Core_BAO_Setting::updateSettingsFromMetaData();
     CRM_Core_Resources::singleton()->resetCacheCode();
     CRM_Case_XMLRepository::singleton(TRUE);
index c459fa0cc8a655211807c391751c3801d37e96d2..3fdc463c2c8ad4cfac5462b11c02f243326f4975 100644 (file)
@@ -724,7 +724,7 @@ HTACCESS;
   }
 
   /**
-   * Flush the dynamic resource directory
+   * Delete all files from the dynamic resource directory
    */
   static function flushDynamicResources() {
     $files = glob(self::dynamicResourcePath('*'));