X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=wwwroot%2Finc%2Fsmarty%2Fnode_methodz%2Ffunction.get_linked_nodes.php;h=22fde3769b8495f4a80081201cbe9f0a1db1f193;hb=6cfa89c1d31d80113ea9e59580bbd9740ddf2e4e;hp=9a846e4022a0e5ec6c54c703cad521489eb1d231;hpb=68839d5d9431c2d07e3f40c6a5faa46dc880c414;p=mirrors%2FKyberia-bloodline.git diff --git a/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php b/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php index 9a846e4..22fde37 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_linked_nodes.php @@ -4,9 +4,12 @@ function smarty_function_get_linked_nodes($params,&$smarty) { global $error, $node; - if ($params['listing_amount']=='all') $listing_amount=DEF_MAX_LISTING_AMMOUNT; - elseif (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount']; - else $listing_amount=DEFAULT_LISTING_AMOUNT; + if (empty($params['listing_amount'])) { + $listing_amount=DEFAULT_LISTING_AMOUNT; + } else { + if ($params['listing_amount']=='all') $listing_amount=DEF_MAX_LISTING_AMMOUNT; + elseif (is_numeric($params['listing_amount'])) $listing_amount=$params['listing_amount']; + } if (isset($params['offset']) && is_numeric($params['offset'])) $offset=$params['offset']; elseif (isset($_POST['offset']) && is_numeric($_POST['offset'])) $offset=$_POST['offset']; @@ -25,7 +28,7 @@ function smarty_function_get_linked_nodes($params,&$smarty) { } $get_linked_nodes=nodes::getLinkedNodes($node_id,$orderby,$offset,$listing_amount); - $smarty->assign('get_linked_nodes',$get_linked_nodes); + if ($get_linked_nodes) $smarty->assign('get_linked_nodes',$get_linked_nodes); } ?>