]> git.mxchange.org Git - mailer.git/blobdiff - inc/header.php
Several kinky code smoothed, fixes for admin login
[mailer.git] / inc / header.php
index cd22a87054acce3f2e7d37ab4998be2f7ca7bbe5..06da594e4d73fb13348a091890ab0c79cfa5a232 100644 (file)
@@ -44,14 +44,14 @@ if (!defined('__SECURITY')) {
 }
 
 // Is the header already sent?
-if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
+if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) {
        // If not in CSS mode generate the header
-       if ((getOutputMode() != '1')) {
-               // Generate header
-               $TITLE = '';
-
+       if (getOutputMode() != 1) {
                // Config and database connection valid?
-               if ((isConfigLocalLoaded()) && (isConfigLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionActive('sql_patches'))) {
+               if ((isConfigLocalLoaded()) && (isConfigurationLoaded()) && (SQL_IS_LINK_UP()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.6'))) {
+                       // Init title
+                       $TITLE = '';
+
                        // Title decoration enabled?
                        if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_left') != '')) $TITLE .= trim(getConfig('title_left'))." ";
 
@@ -94,7 +94,7 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
                        $content['header_title'] = getMessage('NO_CONFIG_FOUND_TITLE');
 
                        // Do not add the fatal message in installation mode
-                       if ((!isInstalling()) && (!isConfigLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND'));
+                       if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND'));
                }
 
                // Save some little memory
@@ -123,12 +123,12 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
        } // END - if
 
        // Closing HEAD tag
-       if (getOutputMode() != '1') outputHtml('</head>');
+       if (getOutputMode() != 1) outputHtml('</head>');
        if ($GLOBALS['header_sent'] == 0) $GLOBALS['header_sent'] = 1;
 } // END - if
 
 // Add BODY tag or not?
-if ((getOutputMode() != '1') && ($GLOBALS['header_sent'] == 1)) {
+if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) {
        loadTemplate('page_body');
        $GLOBALS['header_sent'] = 2;
 } // END - if