From 0498dea190ab80ccbab59ea5137efc29418bfd5e Mon Sep 17 00:00:00 2001 From: niekt0 Date: Sun, 15 Jan 2012 01:02:52 +0100 Subject: [PATCH] display event optimization (removed useless query) --- wwwroot/inc/eventz/display.inc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wwwroot/inc/eventz/display.inc b/wwwroot/inc/eventz/display.inc index 7a7cfc7..50b2baf 100644 --- a/wwwroot/inc/eventz/display.inc +++ b/wwwroot/inc/eventz/display.inc @@ -138,9 +138,11 @@ else { // XXX into function -if (isset($_SESSION['user_id'])){ -//setting user location - $q="update users set last_action=NOW(),user_location_vector='".$node['node_vector']."',user_action='".addslashes($node['node_name'])."',user_action_id='".$node['node_id']."' where user_id='".$_SESSION['user_id']."'"; +if (isset($_SESSION['user_id']) && ($_SESSION['user_id']!='')){ + //setting user location + $q="update users set last_action=NOW(),user_location_vector='". + $node['node_vector']."',user_action='".addslashes($node['node_name']). + "',user_action_id='".$node['node_id']."' where user_id='".$_SESSION['user_id']."'"; $db->query($q); } -- 2.30.2