X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Ftemplate-functions.php;h=fe01016b23aa1d8f44fa7a7262812e5b678b7af5;hb=0303e7070f928a037e61ff010517f64e583351a5;hp=e2cb87becc01362a6d44a03faa6667fd7b545dac;hpb=5e7345f4959aacc2d5be0098f474770b483a0869;p=mailer.git diff --git a/inc/template-functions.php b/inc/template-functions.php index e2cb87becc..fe01016b23 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -93,7 +93,7 @@ function getColorSwitchCode ($template) { } // Output HTML code directly or 'render' it. You addionally switch the new-line character off -function outputHtml ($htmlCode, $newLine = TRUE) { +function outputHtml ($htmlCode = NULL, $newLine = TRUE) { // Init output if (!isset($GLOBALS['__output'])) { $GLOBALS['__output'] = ''; @@ -101,7 +101,7 @@ function outputHtml ($htmlCode, $newLine = TRUE) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getOutputMode()=' . getOutputMode() . ',htmlCode(length)=' . strlen($htmlCode) . ',output(length)=' . strlen($GLOBALS['__output'])); // Is there HTML-Code here? - if (!empty($htmlCode)) { + if ((!is_null($htmlCode)) && (!empty($htmlCode))) { // Yes, so we handle it as you have configured switch (getOutputMode()) { case 'render': @@ -1549,17 +1549,8 @@ function determinePageTitle () { $pageTitle .= ' {%config,trim=title_middle%} {DQUOTE} . getModuleTitle(getModule()) . {DQUOTE}'; } // END - if - // Add title from what file - $menuMode = ''; - if (getModule() == 'login') { - $menuMode = 'member'; - } elseif (getModule() == 'index') { - $menuMode = 'guest'; - } elseif (getModule() == 'admin') { - $menuMode = 'admin'; - } elseif (getModule() == 'sponsor') { - $menuMode = 'sponsor'; - } + // Get menu mode from module + $menuMode = getMenuModeFromModule(); // Add middle part (always in admin area!) if ((!empty($menuMode)) && ((isWhatTitleEnabled()) || ($menuMode == 'admin'))) {