Two tickets resolved (57/89)
[mailer.git] / inc / libs / online_functions.php
index 4e43875e37ba39023023ebd862532f89f6a7d915..96400dc2b1cfa6fe47533a29d061fa94a9d4d571 100644 (file)
@@ -39,17 +39,13 @@ if (!defined('__SECURITY')) {
 
 // Filter for updates/extends on the online list
 function FILTER_UPDATE_ONLINE_LIST () {
-       global $PHPSESSID;
-
        // Do not update online list when extension is deactivated
        if (!EXT_IS_ACTIVE("online", true)) return;
 
        // Empty session?
-       if (empty($PHPSESSID)) {
+       if (session_id() == "") {
                // This is invalid here!
-               print "Invalid session. Backtrace:<pre>";
-               debug_print_backtrace();
-               die("</pre>");
+               debug_report_bug("Invalid session.");
        } // END - if
 
        // Initialize variables
@@ -74,7 +70,7 @@ function FILTER_UPDATE_ONLINE_LIST () {
 
        // Now search for the user
        $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_online` WHERE sid='%s' LIMIT 1",
-               array($PHPSESSID), __FILE__, __LINE__);
+               array(session_id()), __FILE__, __LINE__);
 
        // Entry found?
        if (SQL_NUMROWS($result) == 1) {
@@ -99,7 +95,7 @@ WHERE sid='%s' LIMIT 1",
                                $MEM,
                                $ADMIN,
                                GET_REMOTE_ADDR(),
-                               $PHPSESSID
+                               session_id()
                        ), __FILE__, __LINE__
                );
        } else {
@@ -113,7 +109,7 @@ WHERE sid='%s' LIMIT 1",
                                $rid,
                                $MEM,
                                $ADMIN,
-                               $PHPSESSID,
+                               session_id(),
                                GET_REMOTE_ADDR()
                        ), __FILE__, __LINE__
                );