X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmysql-connect.php;h=aa7df75574a5dc4d8808687d9c10f676b7e8a10e;hb=6d6e268d55fb9d9374475e12e2f66dca732ce1eb;hp=eaa939dc584e815308a8679cf361bee6af90e78f;hpb=7afdb8e56178524cfa8e1665d7a6db76aff3d125;p=mailer.git diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index eaa939dc58..aa7df75574 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -59,8 +59,11 @@ initErrorHandler(); // Init request initRequest(); +// Init userid +initMemberId(); + // Set important header_sent -if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = 0; +if (!isset($GLOBALS['header_sent'])) $GLOBALS['header_sent'] = '0'; // Init fatal messages initFatalMessages(); @@ -69,20 +72,13 @@ initFatalMessages(); initMessages(); // Check if this file is writeable or read-only and warn the user -if ((!isInstalling()) && (!isInstallationPhase())) { - // Load "databases" aka static arrays - loadIncludeOnce('inc/databases.php'); +if (!isInstalling()) { + // Load configuration file(s) here + loadIncludeOnce('inc/load_config.php'); // Load database layer here loadIncludeOnce('inc/db/lib.php'); - // Set missing module - if (!isModuleSet()) setModule(getRequestElement('module')); - if (!isModuleSet()) setModule('index'); - - // Load configuration file(s) here - loadIncludeOnce('inc/load_config.php'); - // CSS array initExtensionCssFiles(); @@ -115,9 +111,6 @@ if ((!isInstalling()) && (!isInstallationPhase())) { // Check module for permissions $checkModule = checkModulePermissions(); - // Cound module here - countModuleHit(getModule()); - // Admin module should be accessable by guests to login if ((getModule() == 'admin') && ($checkModule == 'admin_only')) { // This is fine and can be ignored @@ -149,16 +142,13 @@ if ((!isInstalling()) && (!isInstallationPhase())) { setConfigEntry('OUTPUT_MODE', 'direct'); // This hack prevents a backtrace in CSS output - if (getOutputMode() == '1') { + if (getOutputMode() == 1) { // Problem with config so set output mode setConfigEntry('OUTPUT_MODE', 'render'); } // END - if - // Set other missing variables - if (!isOutputModeSet()) setOutputMode('0'); - // Include more - foreach (array('inc/databases.php','inc/db/lib.php','inc/session.php','inc/versions.php','inc/install-functions.php','inc/load_config.php') as $inc) { + foreach (array('inc/databases.php','inc/versions.php','inc/db/lib.php','inc/session.php','inc/install-functions.php','inc/load_config.php') as $inc) { // Load the include loadIncludeOnce($inc); } // END - foreach @@ -167,7 +157,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) { loadIncludeOnce('inc/load_config.php'); // Are we installation routine? - if ((!isInstalling()) && (getOutputMode() != '1') && (getOutputMode() != -1)) { + if ((!isInstalling()) && (getOutputMode() != 1) && (getOutputMode() != -1)) { // You have to install first! redirectToUrl('install.php'); } // END - if @@ -183,7 +173,7 @@ if ((!isInstalling()) && (!isInstallationPhase())) { } // Handle fatal errors -handleFatalErrors(); +runFilterChain('handle_fatal_errors'); // [EOF] ?>