From 229a00474645760cb16603d172f13d6270d9200d Mon Sep 17 00:00:00 2001 From: niekt0 Date: Wed, 22 Jun 2011 16:07:02 +0200 Subject: [PATCH] getUserSubmissionChildre fix --- wwwroot/backend/mysql/backend.inc | 9 ++++++++- wwwroot/inc/smarty/node_methodz/function.get_last.php | 4 +--- 2 files changed, 9 insertions(+), 4 deletions(-) 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); - - } + ?> -- 2.30.2