From 2bb027842502e400c6ab0bae7a49d40256bd4c0d Mon Sep 17 00:00:00 2001 From: devjin Date: Thu, 1 Nov 2012 04:50:26 +0000 Subject: [PATCH] issue 2370 remove setting skin path when use a page module. git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12023 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/module/ModuleObject.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/classes/module/ModuleObject.class.php b/classes/module/ModuleObject.class.php index 3a416a712..ccae660bd 100644 --- a/classes/module/ModuleObject.class.php +++ b/classes/module/ModuleObject.class.php @@ -348,9 +348,17 @@ $oModuleModel = getModel('module'); $skinType = (Mobile::isFromMobilePhone()) ? 'M' : 'P'; $skinName = $oModuleModel->getModuleDefaultSkin($this->module, $skinType); - if($skinName) + if($this->module == 'page') { - $this->setTemplatePath(sprintf('%s%s/%s/', $this->module_path, $dir, $skinName)); + $this->module_info->skin = $skinName; + } + else + { + $isTemplatPath = (strpos($this->getTemplatePath(), '/tpl/') !== FALSE); + if(!$isTemplatPath) + { + $this->setTemplatePath(sprintf('%s%s/%s/', $this->module_path, $dir, $skinName)); + } } } else