mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 03:52:15 +09:00
Fix incorrect header script if member module uses its own layout #2474
This commit is contained in:
parent
a478127c61
commit
ef751041dd
2 changed files with 10 additions and 8 deletions
|
|
@ -136,7 +136,6 @@ class HTMLDisplayHandler
|
||||||
// compile if connected to the layout
|
// compile if connected to the layout
|
||||||
if($layout_srl > 0)
|
if($layout_srl > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// handle separately if the layout is faceoff
|
// handle separately if the layout is faceoff
|
||||||
if($layout_info && isset($layout_info->type) && $layout_info->type == 'faceoff')
|
if($layout_info && isset($layout_info->type) && $layout_info->type == 'faceoff')
|
||||||
{
|
{
|
||||||
|
|
@ -164,6 +163,16 @@ class HTMLDisplayHandler
|
||||||
$oTemplate = new Rhymix\Framework\Template;
|
$oTemplate = new Rhymix\Framework\Template;
|
||||||
$output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);
|
$output = $oTemplate->compile($layout_path, $layout_file, $edited_layout_file);
|
||||||
|
|
||||||
|
// Add layout header script.
|
||||||
|
if ($layout_srl > 0)
|
||||||
|
{
|
||||||
|
$part_config = ModuleModel::getModulePartConfig('layout', $layout_srl);
|
||||||
|
if ($part_config && isset($part_config->header_script))
|
||||||
|
{
|
||||||
|
Context::addHtmlHeader($part_config->header_script);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// if popup_layout, remove admin bar.
|
// if popup_layout, remove admin bar.
|
||||||
$realLayoutPath = FileHandler::getRealPath($layout_path);
|
$realLayoutPath = FileHandler::getRealPath($layout_path);
|
||||||
if(substr_compare($realLayoutPath, '/', -1) !== 0)
|
if(substr_compare($realLayoutPath, '/', -1) !== 0)
|
||||||
|
|
|
||||||
|
|
@ -268,13 +268,6 @@ class ModuleHandler extends Handler
|
||||||
|
|
||||||
// Reset layout_srl in module_info.
|
// Reset layout_srl in module_info.
|
||||||
$module_info->{$targetSrl} = $layoutSrl;
|
$module_info->{$targetSrl} = $layoutSrl;
|
||||||
|
|
||||||
// Add layout header script.
|
|
||||||
$part_config = ModuleModel::getModulePartConfig('layout', $layoutSrl);
|
|
||||||
if ($part_config && isset($part_config->header_script))
|
|
||||||
{
|
|
||||||
Context::addHtmlHeader($part_config->header_script);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue