X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Ffunctions.php;h=f55f5135603ad783649c0e0dfd92fd15e04f7ee1;hp=10b4d02d329c05dc548ad0e5d24520cf9cafd306;hb=07612d2debcc78a93678db0deed050d82df432f1;hpb=49248176a5638be80b148ef55d0dc8c334522bf3 diff --git a/inc/functions.php b/inc/functions.php index 10b4d02d32..f55f513560 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -120,6 +120,9 @@ function OUTPUT_HTML ($HTML, $newLine = true) { // Compile and run finished rendered HTML code while (strpos($OUTPUT, '{!') > 0) { + // Replace _MYSQL_PREFIX + $OUTPUT = str_replace("{!_MYSQL_PREFIX!}", getConfig('_MYSQL_PREFIX'), $OUTPUT); + // Prepare the content and eval() it... $newContent = ''; $eval = "\$newContent = \"".COMPILE_CODE(smartAddSlashes($OUTPUT))."\";"; @@ -128,7 +131,7 @@ function OUTPUT_HTML ($HTML, $newLine = true) { // Was that eval okay? if (empty($newContent)) { // Something went wrong! - app_die(__FUNCTION__, __LINE__, "Evaluation error:
".htmlentities($eval).""); + app_die(__FUNCTION__, __LINE__, 'Evaluation error:
' . htmlentities($eval) . ''); } // END - if $OUTPUT = $newContent; } // END - while @@ -286,13 +289,16 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { } elseif (strpos($template, 'la_') > -1) { // 'Logical-area' template found $mode = 'la/'; + } elseif (strpos($template, 'js_') > -1) { + // JavaScript template found + $mode = 'js/'; } else { // Test for extension $test = substr($template, 0, strpos($template, '_')); if (EXT_IS_ACTIVE($test)) { // Set extra path to extension's name - $mode = $test.'/'; - } + $mode = $test . '/'; + } // END - if } //////////////////////// @@ -341,8 +347,11 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { $ret = $tmpl_file; } - // Add surrounding HTML comments to help finding bugs faster - $ret = "\n" . $ret . "\n"; + // Normal HTML output? + if ($GLOBALS['output_mode'] == 0) { + // Add surrounding HTML comments to help finding bugs faster + $ret = "\n" . $ret . "\n"; + } // END - if } elseif ((IS_ADMIN()) || ((isInstalling()) && (!isInstalled()))) { // Only admins shall see this warning or when installation mode is active $ret = "