X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FResources.php;h=744e5be721ddd58c5ca1760c8606072f9feb1c06;hb=d09edf64e678a73669cff34014a55a06604de75a;hp=ca6d0f003a732b59069bb92777fd48de1c35e848;hpb=fa92b4af1c4abf280689cea6445c7a9b99858831;p=civicrm-core.git diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index ca6d0f003a..744e5be721 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -1,29 +1,29 @@ 'js-strings', - 'prefetch' => FALSE, - )); + 'group' => 'js-strings', + 'prefetch' => FALSE, + )); self::$_singleton = new CRM_Core_Resources( $sys->getMapper(), $cache, @@ -125,15 +125,17 @@ class CRM_Core_Resources { } /** - * Construct a resource manager + * Construct a resource manager. * - * @param CRM_Extension_Mapper $extMapper Map extension names to their base path or URLs. - * @param CRM_Utils_Cache_Interface $cache JS-localization cache + * @param CRM_Extension_Mapper $extMapper + * Map extension names to their base path or URLs. + * @param CRM_Utils_Cache_Interface $cache + * JS-localization cache. * @param string|null $cacheCodeKey Random code to append to resource URLs; changing the code forces clients to reload resources */ public function __construct($extMapper, $cache, $cacheCodeKey = NULL) { $this->extMapper = $extMapper; - $this->cache = $cache; + $this->strings = new CRM_Core_Resources_Strings($cache); $this->cacheCodeKey = $cacheCodeKey; if ($cacheCodeKey !== NULL) { $this->cacheCode = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, $cacheCodeKey); @@ -149,17 +151,26 @@ class CRM_Core_Resources { /** * Add a JavaScript file to the current page using