get_threaded_children moved to backend
[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
14 // XXX WTF
15 if ($node['node_system_access']=='public') { $security="yes"; }
16 else { $security = ""; }
17
18 if (!empty($params['search'])) {
19 if ($params['search_type']=='content') {
20 $search='content';
21 $search_param=$params['search'];
22 } else {
23 $id=nodes::getUserByLogin($params['search']);
24 $search='user';
25 $search_param=$id;
26 }
27 } else {
28 $search="";
29 $search_param="";
30 }
31
32 nodes::getThreadedChildren($offset,$limit,$orderby,$time,$synapse_time,$security,$link,$search,$search_param);
33
34 $smarty->assign('get_threaded_children',$get_children_array);
35 }
36 ?>
This page took 0.423587 seconds and 4 git commands to generate.