removed more warnings
authorniekt0 <niekt0@kyberia.cz>
Fri, 1 Apr 2011 23:36:45 +0000 (01:36 +0200)
committerniekt0 <niekt0@kyberia.cz>
Fri, 1 Apr 2011 23:36:45 +0000 (01:36 +0200)
wwwroot/inc/smarty/node_methodz/function.get_userlist.php

index 99cc04454f81a40eeb2ca57f16afb2a170da9033..da3e96e3389612d54177f595ec6d25d2baf597b2 100644 (file)
@@ -1,18 +1,19 @@
 <?php
        function smarty_function_get_userlist($params,&$smarty) {
                global $db,$node;
-               if (is_numeric($params['node_id'])) $node_id=$params['node_id'];
+               if ((isset($params['node_id'])) && (is_numeric($params['node_id']))) 
+               { $node_id=$params['node_id']; 
 
-               else $node_id=$node['node_id'];
-               if ($params['vector']) {
+               else $node_id=$node['node_id'];
+               if ((isset($params['vector'])) && ($params['vector'])) {
                        $vector=AddSlashes($params['vector']);
                }
-               if ($_SESSION['cube_vector']) {
+               if ((isset($_SESSION['cube_vector'])) && ($_SESSION['cube_vector'])) {
                        $vector=$_SESSION['cube_vector'];
                }
 
                $q="select user_action,user_action_id,(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(last_action)) as  idle,login,user_id from users where ";
-               if ($vector) $q.=" user_location_vector like '$vector%' and ";
+               if (isset($vector) && $vector) $q.=" user_location_vector like '$vector%' and ";
                $q.=" invisible != 'yes' and user_action_id IS NOT NULL order by login";
 
                $set=$db->query($q);
This page took 0.227328 seconds and 4 git commands to generate.