X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Fsmarty%2Fnode_methodz%2Ffunction.get_nodes_by_type.php;h=fe45e7c0ec21b7023e6d6913ed5711978e82165c;hb=d9b4dfbcb3d920445869db2c3abd706ee6916286;hp=136500ca3b385e7c60bb365b95f17dad3833034f;hpb=d69b37e1bc784d7510f587add2a6b9b14ba3b2fe;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/smarty/node_methodz/function.get_nodes_by_type.php b/wwwroot/inc/smarty/node_methodz/function.get_nodes_by_type.php index 136500c..fe45e7c 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_nodes_by_type.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_nodes_by_type.php @@ -3,21 +3,23 @@ function smarty_function_get_nodes_by_type($params,&$smarty) { global $node; + $vector=""; + $orderby=""; $type=$params['type']; if ($params['listing_amount']=='all') $listing_amount=DEF_MAX_LISTING_AMMOUNT; else $listing_amount=$params['listing_amount']; if (empty($params['offset'])) $offset=0; else $offset=$params['offset']; - if ($params['vector']) { + if (isset($params['vector']) && $params['vector']) { $vector=$params['vector']; } - if ($params['orderby']) { + if (isset($params['orderby']) && $params['orderby']) { $orderby=$params['orderby']; } $node_id=$node['node_id']; $user_id=$_SESSION['user_id']; - $result=nodes::getNodesByType(isset($vector)?$vector:"",$user_id,$type,isset($orderby)?$orderby:"",$offset,$listing_amount); + $result=nodes::getNodesByType($vector,$user_id,$type,$orderby,$offset,$listing_amount); $smarty->assign('get_nodes_by_type',$result);