From: niekt0 Date: Tue, 15 Mar 2011 02:08:57 +0000 (+0100) Subject: k_neurons fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=290d120f627e6db6eb33c5acfcde58c469cbd4d8;p=mirrors%2FKyberia-bloodline.git k_neurons fix --- diff --git a/wwwroot/inc/smarty/node_methodz/function.get_image_link.php b/wwwroot/inc/smarty/node_methodz/function.get_image_link.php index ca181f3..c22939a 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_image_link.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_image_link.php @@ -3,7 +3,7 @@ function smarty_function_get_image_link($params,&$smarty) { global $db; $id = $params['id']; - if (!is_numeric($id)) { return 1;} + if (!is_numeric($id)) { $id=0;} $img = './'.SYSTEM_IMAGES.'/nodes/'.substr($id,0,1)."/".substr($id,1,1)."/$id.gif"; if (file_exists($img)) { @@ -18,7 +18,6 @@ function smarty_function_get_image_link($params,&$smarty) { } echo $imglink; } - return 0; } ?> diff --git a/wwwroot/inc/smarty/node_methodz/function.get_k_neurons.php b/wwwroot/inc/smarty/node_methodz/function.get_k_neurons.php index dc28c9c..3711415 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_k_neurons.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_k_neurons.php @@ -5,7 +5,7 @@ function smarty_function_get_k_neurons($params,&$smarty) { global $db,$node; if (isset($params['offset']) && (is_numeric($params['offset']))) { $offset=$params['offset']; - } else {$offset=0;} + } else {$offset=20;} if (isset($params['listing_amount']) && (is_numeric($params['listing_amount']))) { $listing_amount=$params['listing_amount']; } else {$listing_amount=DEFAULT_LISTING_AMOUNT;} @@ -18,8 +18,8 @@ function smarty_function_get_k_neurons($params,&$smarty) { } else {$vector="00";} - // XXX offset + id $params['user_id'] - $k_array=nodes::getKNeurons(904,20); + // XXX other parameters + $k_array=nodes::getKNeurons($_SESSION['user_id'],$offset); $smarty->assign('get_k_neurons',$k_array);