mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Fix setLayoutAndTemplatePaths() no-op when PC layout is set to -1
This commit is contained in:
parent
75198423f3
commit
fb85d62f2f
1 changed files with 12 additions and 4 deletions
|
|
@ -601,6 +601,11 @@ class ModuleObject extends BaseObject
|
|||
if ($type === 'P')
|
||||
{
|
||||
$layout_srl = $config->layout_srl ?? 0;
|
||||
if ($layout_srl == -1)
|
||||
{
|
||||
$layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('P');
|
||||
}
|
||||
|
||||
if ($layout_srl > 0)
|
||||
{
|
||||
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
|
||||
|
|
@ -627,11 +632,14 @@ class ModuleObject extends BaseObject
|
|||
$layout_srl = LayoutAdminModel::getInstance()->getSiteDefaultLayout('M');
|
||||
}
|
||||
|
||||
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
|
||||
if($layout_info)
|
||||
if ($layout_srl > 0)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
$layout_info = LayoutModel::getInstance()->getLayout($layout_srl);
|
||||
if($layout_info)
|
||||
{
|
||||
$this->module_info->mlayout_srl = $layout_srl;
|
||||
$this->setLayoutPath($layout_info->path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue