]> git.mxchange.org Git - mailer.git/blobdiff - inc/filter/online_filter.php
Changed order of AND to avoid call of function(s)
[mailer.git] / inc / filter / online_filter.php
index c124eec65edad33a10c8d21d98d09e7e1a6400e8..26dd41df983dddcd6fb8d7e7bf487863113ccf2b 100644 (file)
@@ -51,7 +51,7 @@ function FILTER_UPDATE_ONLINE_LIST ($filterData) {
        } // END - if
 
        // Empty session?
-       if (session_id() == '') {
+       if (!isSessionValid()) {
                // This is invalid here!
                reportBug(__FUNCTION__, __LINE__, 'Invalid session.');
        } // END - if
@@ -60,7 +60,7 @@ function FILTER_UPDATE_ONLINE_LIST ($filterData) {
        $userid   = NULL;
        $isMember = convertBooleanToYesNo(isMember());
        $isAdmin  = convertBooleanToYesNo(isAdmin());
-       $action   = getActionFromModuleWhat(getModule(), getWhat(false));
+       $action   = getActionFromModuleWhat(getModule(), getWhat(FALSE));
 
        // Valid userid?
        if (isMember()) {
@@ -93,7 +93,7 @@ LIMIT 1",
                array(
                        getModule(),
                        $action,
-                       getWhat(false),
+                       getWhat(FALSE),
                        convertZeroToNull($userid),
                        convertZeroToNull(determineReferralId()),
                        $isMember,
@@ -103,11 +103,11 @@ LIMIT 1",
                ), __FUNCTION__, __LINE__);
        } else {
                // No entry does exists so we simply add it!
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_online` (`module`,`action`,`what`,`userid`,`refid`,`is_member`,`is_admin`,`timestamp`,`sid`,`ip`) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_online` (`module`, `action`, `what`, `userid`, `refid`, `is_member`, `is_admin`, `timestamp`, `sid`, `ip`) VALUES ('%s','%s','%s', %s, %s, '%s','%s', UNIX_TIMESTAMP(), '%s','%s')",
                        array(
                                getModule(),
                                $action,
-                               getWhat(false),
+                               getWhat(FALSE),
                                convertZeroToNull($userid),
                                convertZeroToNull(determineReferralId()),
                                $isMember,