From 6429e3556743768df30fb6e9241cf64545032bbd Mon Sep 17 00:00:00 2001 From: devjin Date: Wed, 28 Sep 2011 09:42:10 +0000 Subject: [PATCH] fixed theme layouts error git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9409 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/admin.admin.model.php | 1 - modules/admin/tpl/theme.html | 1 - modules/layout/layout.model.php | 9 +++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/admin/admin.admin.model.php b/modules/admin/admin.admin.model.php index ea60bfdf2..b00adfb9e 100644 --- a/modules/admin/admin.admin.model.php +++ b/modules/admin/admin.admin.model.php @@ -157,7 +157,6 @@ $theme_info[$val] = $this->getThemeInfo($val); } } - debugPrint($theme_info); return $theme_info; } diff --git a/modules/admin/tpl/theme.html b/modules/admin/tpl/theme.html index bcccdce24..9f3ca687d 100644 --- a/modules/admin/tpl/theme.html +++ b/modules/admin/tpl/theme.html @@ -6,7 +6,6 @@ jQuery(function($){ var themes = {}; -// Example - default theme {@$skins = array()} {@$skins[] = "'".$module."' : '".$skin_info->name."'";} diff --git a/modules/layout/layout.model.php b/modules/layout/layout.model.php index f69c01b59..9bdfe4f88 100644 --- a/modules/layout/layout.model.php +++ b/modules/layout/layout.model.php @@ -85,13 +85,14 @@ * @brief Get a layout path **/ function getLayoutPath($layout_name, $layout_type = "P") { - if($layout_name == 'faceoff'){ + $layout_parse = explode('.', $layout_name); + if (count($layout_parse) > 1){ + $class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/'; + }else if($layout_name == 'faceoff'){ $class_path = './modules/layout/faceoff/'; }else if($layout_type == "M") { $class_path = sprintf("./m.layouts/%s/", $layout_name); - } - else - { + }else { $class_path = sprintf('./layouts/%s/', $layout_name); } if(is_dir($class_path)) return $class_path;