mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
issue 2625 add about setting of default layout/skin.
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@11898 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
afd6f9b5ae
commit
1c3e69f91f
15 changed files with 176 additions and 80 deletions
|
|
@ -340,30 +340,16 @@
|
|||
}
|
||||
|
||||
// integrate skin information of the module(change to sync skin info with the target module only by seperating its table)
|
||||
if($this->module_info->is_skin_fix == 'N' && $this->module != 'admin' && strpos($this->act, 'Admin') === false)
|
||||
$is_default_skin = ((!Mobile::isFromMobilePhone() && $this->module_info->is_skin_fix == 'N') || (Mobile::isFromMobilePhone() && $this->module_info->is_mskin_fix == 'N'));
|
||||
if($is_default_skin && $this->module != 'admin' && strpos($this->act, 'Admin') === false)
|
||||
{
|
||||
$designInfoFile = sprintf(_XE_PATH_.'files/site_design/design_%s.php', $this->module_info->site_srl);
|
||||
if(is_readable($designInfoFile))
|
||||
$dir = (Mobile::isFromMobilePhone()) ? 'm.skins' : 'skins';
|
||||
$oModuleModel = getModel('module');
|
||||
$skinType = (Mobile::isFromMobilePhone()) ? 'M' : 'P';
|
||||
$skinName = $oModuleModel->getModuleDefaultSkin($this->module, $skinType);
|
||||
if($skinName)
|
||||
{
|
||||
@include($designInfoFile);
|
||||
|
||||
$skinName = $designInfo->module->{$this->module_info->module}->skin;
|
||||
|
||||
if($skinName)
|
||||
{
|
||||
$this->setTemplatePath(sprintf('%sskins/%s/', $this->module_path, $skinName));
|
||||
}
|
||||
|
||||
$skinVars = $designInfo->module->{$this->module_info->module}->skin_vars;
|
||||
|
||||
if($skinVars)
|
||||
{
|
||||
$skinVars = unserialize($skinVars);
|
||||
foreach($skinVars as $key => $val)
|
||||
{
|
||||
$this->module_info->{$key} = $val;
|
||||
}
|
||||
}
|
||||
$this->setTemplatePath(sprintf('%s%s/%s/', $this->module_path, $dir, $skinName));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue