function get_active_themes_info() { global $mainframe; //$key = T3Parameter::getKey ('themes-info',2); $key = T3Cache::getThemeKey(); $themes_info = T3Cache::get_object($key); //force cache if ($themes_info && isset($themes_info['layout']) && $themes_info['layout']) { return $themes_info; } $themes = T3Common::get_active_themes(); $themes[] = array('engine', 'default'); $themes_info = null; foreach ($themes as $theme) { //$theme_info = T3Common::get_themes (implode('.', $theme)); $theme_info = T3Common::get_theme_info($theme); if (!$theme_info) { continue; } if (!$themes_info) { $themes_info = $theme_info; } else { //merge info $themes_info = T3Common::merge_info($theme_info, $themes_info); } } //Get layout if tmpl is not component $themes_info['layout'] = null; $tmpl = JRequest::getCmd('tmpl'); if ($tmpl != 'component') { $themes_info['layout'] = T3Common::get_layout_info(); } T3Cache::store_object($themes_info, $key); return $themes_info; }
function setObject($name, $object) { $template = T3_ACTIVE_TEMPLATE; $preload = T3Preload::getInstance(); $preload->data[$template][$name] = $object; //$key = T3Parameter::getKey ('preload-'.$template, 0); $key = T3Cache::getPreloadKey($template); T3Cache::store_object($preload->data[$template], $key); }