From 16ec3c0b28ff8ac1b1e626cca9cc934433d2510f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 3 Nov 2009 16:34:38 +0000 Subject: [PATCH] Workarounds for empty referal id --- inc/libs/online_functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inc/libs/online_functions.php b/inc/libs/online_functions.php index fb7dfc7c89..95643bc0cd 100644 --- a/inc/libs/online_functions.php +++ b/inc/libs/online_functions.php @@ -86,7 +86,7 @@ SET `action`='%s', `what`='%s', `userid`=%s, - `refid`=%s, + `refid`='%s', `is_member`='%s', `is_admin`='%s', `timestamp`=UNIX_TIMESTAMP(), @@ -107,7 +107,7 @@ 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(), getAction(), @@ -125,7 +125,7 @@ LIMIT 1", SQL_FREERESULT($result); // Purge old entries - SQL_QUERY("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - {?online_timeout?})", __FUNCTION__, __LINE__); + SQL_QUERY('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_online` WHERE `timestamp` <= (UNIX_TIMESTAMP() - {?online_timeout?})', __FUNCTION__, __LINE__); } // [EOF] -- 2.39.5