e2f88675626eaea2f7f2b0201c6d42ef2a590b25
[mirrors/Kyberia-bloodline.git] / wwwroot / inc / smarty / node_methodz / function.get_threaded_children.php
1 <?php
2
3 function smarty_function_get_threaded_children($params,&$smarty) {
4 global $error, $node;
5
6 $offset=isset($params['offset']) ? $params['offset'] : "";
7 $limit=isset($params['listing_amount']) ? $params['listing_amount'] : DEF_LISTING_AMMOUNT;
8 $limit=($limit > DEF_MAX_LISTING_AMMOUNT) ? DEF_MAX_LISTING_AMMOUNT : $limit;
9 $synapse_time= isset($_POST['synapse_time'])? $_POST['synapse_time'] : "";
10 $orderby=isset($params['orderby']) ? $params['orderby'] : "desc";
11 $time=isset($params['time']) ? $params['time'] : "";
12 $link=(isset($params['link']) && $params['link']=='yes') ? "yes" : "";
13 $node_id=$node['node_id'];
14 $node_vector=$node['node_vector'];
15
16
17 // XXX WTF
18 if ($node['node_system_access']=='public') { $security="yes"; }
19 else { $security = ""; }
20
21 if (!empty($params['search'])) {
22 if ($params['search_type']=='content') {
23 $search='content';
24 $search_param=$params['search'];
25 } else {
26 $id=nodes::getUserByLogin($params['search']);
27 $search='user';
28 $search_param=$id;
29 }
30 } else {
31 $search="";
32 $search_param="";
33 }
34
35 $get_children_array)=nodes::getThreadedChildren($node_id,$node_vector,$offset,$limit,$orderby,$time,$synapse_time,$security,$link,$search,$search_param);
36
37 $smarty->assign('get_threaded_children',$get_children_array);
38 }
39 ?>
This page took 0.290931 seconds and 3 git commands to generate.