getUserSubmissionChildre fix
authorniekt0 <niekt0@kyberia.cz>
Wed, 22 Jun 2011 14:07:02 +0000 (16:07 +0200)
committerniekt0 <niekt0@kyberia.cz>
Wed, 22 Jun 2011 14:07:02 +0000 (16:07 +0200)
wwwroot/backend/mysql/backend.inc
wwwroot/inc/smarty/node_methodz/function.get_last.php

index aa6e3c97b9ab0314284a6fbe3432f67e4ceb1ac3..7efab4280258b680e9d21ceb91cb58b5fe50b9d9 100644 (file)
@@ -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;
+
 }
 
 
index b5298a9892a383b2d30093874573a9b77dd13f43..340f2e9973d74bfe62cdb3bef107a9bd13ffb12e 100644 (file)
@@ -1,13 +1,11 @@
 <?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);
-
-
 }
+
 ?>
This page took 0.204246 seconds and 4 git commands to generate.