k_neurons fix
authorniekt0 <niekt0@kyberia.cz>
Tue, 15 Mar 2011 02:08:57 +0000 (03:08 +0100)
committerniekt0 <niekt0@kyberia.cz>
Tue, 15 Mar 2011 02:08:57 +0000 (03:08 +0100)
wwwroot/inc/smarty/node_methodz/function.get_image_link.php
wwwroot/inc/smarty/node_methodz/function.get_k_neurons.php

index ca181f373b8ba98bb8d26deac6cd45aa1d93635c..c22939afa6eb7091c6d90337356f9544f613d860 100644 (file)
@@ -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;
 }
 
 ?>
index dc28c9c9ac3500595b33a5318257127442444d34..3711415b4eb348a5273d961fa43ed1571ec637cc 100644 (file)
@@ -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);
This page took 0.137167 seconds and 4 git commands to generate.