X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Fbackend%2Fmysql%2Fbackend.inc;h=01717362fe91be455dbcc7fb1147b11d38cea2a9;hb=4dbe228fe37a6606365f0f96cd26736972c56a28;hp=7efab4280258b680e9d21ceb91cb58b5fe50b9d9;hpb=229a00474645760cb16603d172f13d6270d9200d;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index 7efab42..0171736 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -370,9 +370,9 @@ public static function getLast($params) { else $offset=addslashes($params['offset']); global $db,$node; - if ($node['node_id']==23) { + if ($node['node_id']==DEF_LAST_NODE) { $interval=" nodes.node_created>NOW()-INTERVAL 65 HOUR and"; - $params['vector']="00"; + $vector="00"; } else { $vector=$node['node_vector']; @@ -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; } + + } ?>