From da3c207fa3c89b80ef4088c529dbe38164cc21fc Mon Sep 17 00:00:00 2001 From: Cameron Date: Fri, 7 May 2021 10:57:05 -0700 Subject: [PATCH] Removed auto-inserting of {WMESSAGE} when theme.html is detected. Improved theme layout debug message. --- e107_core/templates/header_default.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e107_core/templates/header_default.php b/e107_core/templates/header_default.php index f2b7afbb1..be1102ca6 100644 --- a/e107_core/templates/header_default.php +++ b/e107_core/templates/header_default.php @@ -658,7 +658,7 @@ echo "\n"; } else // Debug info only. No need for LAN. { - echo e107::getMessage()->addError("There is no layout in theme.php with the key: ".$def."")->render(); + echo e107::getMessage()->addError("There is no layout in theme.php with the key: ".$def." or your layout is missing {---}. ")->render(); } } @@ -805,7 +805,7 @@ e107::getDebug()->logTime('Render Layout'); // echo $HEADER; } - unset($def, $noBody, $psc); + // ----------------------------------------------------------------------------- @@ -838,7 +838,7 @@ e107::getDebug()->logTime('Render Other'); * fix - only when e_FRONTPAGE set to true * @see core_index_index_controller/actionIndex */ - if(deftrue('e_FRONTPAGE') && strpos($HEADER, "{WMESSAGE") === false && strpos($FOOTER, "{WMESSAGE") === false) // Auto-detection to override old pref. + if(deftrue('e_FRONTPAGE') && ($noBody !== true) && strpos($HEADER, "{WMESSAGE") === false && strpos($FOOTER, "{WMESSAGE") === false) // Auto-detection to override old pref. { echo e107::getParser()->parseTemplate("{WMESSAGE}"); } @@ -862,5 +862,7 @@ e107::getDebug()->logTime('Render Other'); unset($text); } +unset($def, $noBody, $psc); $GLOBALS['FOOTER'] = $FOOTER; + //Trim whitepsaces after end of the script \ No newline at end of file