public function getResourcesSettings() { $config = DiscussHelper::getConfig(); // Build a deterministic cache $settings = array("language" => JFactory::getLanguage()->getTag(), "template" => array("site" => $config->get('layout_theme')), "view" => array(), "modified" => filemtime($this->resourceManifestFile)); // Get manifest $manifest = $this->getResourcesManifest(); if (isset($manifest[0]->view) && $manifest[0]->view) { foreach ($manifest[0]->view as $view) { $theme = new DiscussThemes(); $path = $theme->resolve($view . '.ejs'); // If the file still does not exist, we'll skip this if (!JFile::exists($path)) { continue; } $settings["view"][] = array("path" => str_ireplace(JPATH_ROOT, '', $path), "modified" => filemtime($path)); } } // Build hash $settings["id"] = md5(serialize($settings)); return $settings; }