moved get_node_userlist into backend, removed some warnings
[mirrors/Kyberia-bloodline.git] / wwwroot / backend / mysql / backend.inc
index 7b1957770f0d1f170034ec2c1f30fb1a762dea4c..01717362fe91be455dbcc7fb1147b11d38cea2a9 100644 (file)
@@ -482,8 +482,30 @@ public static function getSynapseWeight($user_id,$node_id){
        if (! ($synapse_weight) ) { $synapse_weight = 1;}       
 
        return $synapse_weight;
+}
+
+// getNodeUserlist
+
+// Get list of users currently viewing specified node.
+// Secure.
+// Returns list of (login, user_id)
+
+public static function getNodeUserlist($node_id) {
+
+       global $db;
+       if (!is_numeric($node_id))
+                { return -1; }
+               
+
+       $set=$db->query("select login,user_id from users where user_action_id='$node_id'");
+       while ($set->next()) {
+               $userlist[]=$set->getRecord();
+       }
 
+       return $userlist;
 }
+
+
 }
 
 ?>
This page took 0.109465 seconds and 4 git commands to generate.