// XXX orderby mysql escape
$q = "select child.*, users.login as login, parent.node_name as parent_name from nodes as child join
- (select node_id,node_creator from nodes where node_creator='$user_id')
+ (select node_id,node_name,node_creator from nodes where node_creator='$user_id')
as parent on child.node_parent=parent.node_id and child.node_creator <> '$user_id'
join users as users on users.user_id=child.node_creator order by node_created desc
$orderby LIMIT $offset,$limit";
nodes.node_system_access!='private' order by nodes.node_id desc LIMIT $offset,$listing_amount ";
$set=$db->query($q);
+
+ while ($set->next()) {
+ $last[]=$set->getRecord();
+ }
+
+ return $last;
+
}
<?php
// Get last submissions that appeared on kyberia (all users)
-// XXX permission checking?
function smarty_function_get_last($params,&$smarty) {
$last=nodes::GetLast($params/*$listing_ammount,$offset,$order_by*/);
$smarty->assign('get_last', $last);
-
-
}
+
?>