Ejemplo n.º 1
0
 /**
  * Get active themes info
  *
  * @return array   Themes information
  */
 public static function get_active_themes_info()
 {
     $key = T3Cache::getThemeKey();
     $t3cache = T3Cache::getT3Cache();
     $themes_info = $t3cache->getObject($key);
     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->storeObject($themes_info, $key);
     return $themes_info;
 }
Ejemplo n.º 2
0
 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;
 }