reading and checking for session variables rewritten
[mailer.git] / inc / mysql-connect.php
index 6f2f6182a12a7f94a2e0f0dc9aa52922d2a9d808..e01516610f9900711d3adc77b499b871496e6fdb 100644 (file)
@@ -60,7 +60,7 @@ if ((empty($MySQL['login'])) && (!isBooleanConstantAndTrue('mxchange_installing'
                // Please run the installation script (maybe again)
                die(DIE_RUN_INSTALL_MYSQL);
        }
-} elseif ((!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (empty($MySQL['password'])) && (warn_no_pass)) {
+} elseif ((!isBooleanConstantAndTrue('mxchange_installing')) && (!isset($_GET['installing'])) && (empty($MySQL['password'])) && (isBooleanConstantAndTrue('warn_no_pass'))) {
        // No database password entered!!!
        echo "<STRONG>".LANG_WARNING.":</STRONG> ".WARN_NULL_PASSWORD;
 }
@@ -121,7 +121,7 @@ LIMIT 1", __FILE__, __LINE__);
                                        require_once(PATH."inc/mysql-manager.php"); // Functions which interact with the database
 
                                        // Run daily reset
-                                       if ((date("d", $_CONFIG['last_update']) != date("d", time()) || (DEBUG_MODE == true)) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
+                                       if ((date("d", $_CONFIG['last_update']) != date("d", time()) || ((isBooleanConstantAndTrue('DEBUG_MODE')))) && (!isBooleanConstantAndTrue('mxchange_installing')) && (isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered')) && (!isset($_GET['register'])) && ($CSS != 1)) {
                                                // Do daily things in external PHP file but only when script is completely setup
                                                $INC_POOL[] = PATH."inc/reset/reset_daily.php";
 
@@ -161,11 +161,8 @@ LIMIT 1", __FILE__, __LINE__);
                                        // Secure and validate user ID from cookie
                                        UPDATE_LOGIN_DATA();
 
-                                       // Get session ID
-                                       if (empty($_SESSION['PHPSESSID'])) $_SESSION['PHPSESSID'] = session_id();
-
                                        // Update online list
-                                       UPDATE_ONLINE_LIST($_SESSION['PHPSESSID'], $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
+                                       UPDATE_ONLINE_LIST(get_session('PHPSESSID'), $GLOBALS['module'], $GLOBALS['action'], $GLOBALS['what']);
 
                                        // Load theme name
                                        $CurrTheme = GET_CURR_THEME();