1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Avoid checking _header_ and _footer_ layouts for divider shortcode. ie. {---}

This commit is contained in:
Cameron 2014-02-21 06:30:25 -08:00
parent ccc2f53eca
commit d3940eafd9

View File

@ -580,9 +580,21 @@ echo "</head>\n";
{
foreach($LAYOUT as $key=>$template)
{
list($hd,$ft) = explode("{---}",$template);
$HEADER[$key] = isset($LAYOUT['_header_']) ? $LAYOUT['_header_'] . $hd : $hd;
$FOOTER[$key] = isset($LAYOUT['_footer_']) ? $ft . $LAYOUT['_footer_'] : $ft ;
if($key == '_header_' || $key == '_footer_')
{
continue;
}
if(strpos($template,'{---}') !==false)
{
list($hd,$ft) = explode("{---}",$template);
$HEADER[$key] = isset($LAYOUT['_header_']) ? $LAYOUT['_header_'] . $hd : $hd;
$FOOTER[$key] = isset($LAYOUT['_footer_']) ? $ft . $LAYOUT['_footer_'] : $ft ;
}
else
{
e107::getMessage()->addDebug('Missing "{---}" in $LAYOUT["'.$key.'"] ');
}
}
unset($hd,$ft);
}