Permalink
Browse files

display event optimization (removed useless query)

  • Loading branch information...
1 parent 831f7f0 commit 0498dea190ab80ccbab59ea5137efc29418bfd5e niekt0 committed Jan 15, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 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);
}

0 comments on commit 0498dea

Please sign in to comment.