From: niekt0 Date: Sun, 15 Jan 2012 00:02:52 +0000 (+0100) Subject: display event optimization (removed useless query) X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=0498dea190ab80ccbab59ea5137efc29418bfd5e;p=mirrors%2FKyberia-bloodline.git display event optimization (removed useless query) --- 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); }