X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fheader.php;h=a57016954a938722aff8255568e68ce895b673f1;hb=af0d7727246bdfb13ab844727ac75750ad5d21b7;hp=50eebd774255d3736a3b39342311559c3f5f3f4b;hpb=4430deea8d457245b0434b2b71570ad692dc7f6c;p=mailer.git diff --git a/inc/header.php b/inc/header.php index 50eebd7742..a57016954a 100644 --- a/inc/header.php +++ b/inc/header.php @@ -49,7 +49,7 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) { // Add title decorations? (left) if (!defined('__PAGE_TITLE')) { // Config and database connection valid? - if ((isset($_CONFIG)) && (is_array($_CONFIG)) && (count($_CONFIG) > 1) && (SQL_IS_LINK_UP())) { + if ((isConfigLoaded()) && (SQL_IS_LINK_UP())) { // Title decoration enabled? if ((getConfig('enable_title_deco') == "Y") && (getConfig('title_left') != "")) $TITLE .= trim(getConfig('title_left'))." "; @@ -76,21 +76,18 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) { // Remember title in constant for the template define('__PAGE_TITLE', $TITLE); - } elseif ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndTrue('admin_registered'))) { - // Load language file because it was missing in installation finalizer step... *sigh* - $INC = sprintf("inc/language/install_%s.php", - GET_LANGUAGE() - ); - LOAD_INC_ONCE($INC); + } elseif ((!isInstalled()) || (!isAdminRegistered())) { + // Load language here + LOAD_INC_ONCE("inc/language/install_".GET_LANGUAGE().".php"); // Installation mode - define('__PAGE_TITLE', getMessage('INSTALLATION_OF_MXCHANGE')); + define('__PAGE_TITLE', sprintf(getMessage('INSTALLATION_OF_MXCHANGE'), constant('MAIN_TITLE'))); } else { // Configuration not found! define('__PAGE_TITLE', getMessage('NO_CONFIG_FOUND_TITLE')); // Do not add the fatal message in installation mode - if (basename($_SERVER['PHP_SELF']) != "install.php") addFatalMessage(getMessage('NO_CONFIG_FOUND')); + if (basename($_SERVER['PHP_SELF']) != "install.php") addFatalMessage(__FILE__, __LINE__, getMessage('NO_CONFIG_FOUND')); } } // END - if @@ -106,7 +103,7 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) { LOAD_TEMPLATE("metadata"); // Add meta description to header - if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (SQL_IS_LINK_UP())) { + if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { // Add meta description not in admin and login module and when the script is installed META_DESCRIPTION($GLOBALS['module'], $GLOBALS['what']); } // END - if