display event optimization (removed useless query)
authorniekt0 <niekt0@kyberia.cz>
Sun, 15 Jan 2012 00:02:52 +0000 (01:02 +0100)
committerniekt0 <niekt0@kyberia.cz>
Sun, 15 Jan 2012 00:02:52 +0000 (01:02 +0100)
wwwroot/inc/eventz/display.inc

index 7a7cfc76e98eb6204e9a4b338b1436382996c86e..50b2bafcc151eb902cb049fd66670593f0a9aa43 100644 (file)
@@ -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);
 }
 
This page took 0.279815 seconds and 4 git commands to generate.