if ((!is_numeric($node_id))
or (!is_numeric($offset))
or (!is_numeric($listing_amount)))
- { return -1; } // XXX check return value by caller?
+ { return false; } // XXX check return value by caller?
$orderby=db_escape_string($orderby);
$q="select neurons.synapse_created,node_content,author.login,linker.login as linker,nodes.* from neurons
$array['node_created']=$array['synapse_created'];
$get_linked_nodes[]=$array;
}
- return $get_linked_nodes;
+ return (isset($get_linked_nodes) ? $get_linked_nodes : false);
}
// getThreadedChildren
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'];