X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FResources.php;h=7586d25f243570fc96f038d68e0abfb2a44446bb;hb=2817d84b3736cb0c6051fd9fac875e85f8497caa;hp=dd81093b4f9545f8997618840eb004d76d3fd0cf;hpb=b2ac9e9ca74be7f852e37e0dfbf0e77627471c4d;p=civicrm-core.git diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index dd81093b4f..7586d25f24 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