From: niekt0 Date: Wed, 22 Jun 2011 14:07:02 +0000 (+0200) Subject: getUserSubmissionChildre fix X-Git-Url: https://git.harvie.cz/?p=mirrors%2FKyberia-bloodline.git;a=commitdiff_plain;h=229a00474645760cb16603d172f13d6270d9200d getUserSubmissionChildre fix --- diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index aa6e3c9..7efab42 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -289,7 +289,7 @@ public static function GetUserSubmissionsChildren($user_id,$limit=23,$offset=0,$ // 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"; @@ -388,6 +388,13 @@ public static function getLast($params) { 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; + } diff --git a/wwwroot/inc/smarty/node_methodz/function.get_last.php b/wwwroot/inc/smarty/node_methodz/function.get_last.php index b5298a9..340f2e9 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_last.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_last.php @@ -1,13 +1,11 @@ assign('get_last', $last); - - } + ?>