get_image_link fix
authorniekt0 <niekt0@kyberia.cz>
Tue, 15 Mar 2011 01:27:35 +0000 (02:27 +0100)
committerniekt0 <niekt0@kyberia.cz>
Tue, 15 Mar 2011 01:27:35 +0000 (02:27 +0100)
wwwroot/inc/smarty/node_methodz/function.get_image_link.php

index a391aa07d0107b67bde9505be0c0ff471d2c9520..ca181f373b8ba98bb8d26deac6cd45aa1d93635c 100644 (file)
@@ -2,6 +2,8 @@
 function smarty_function_get_image_link($params,&$smarty) {
        global $db;
        $id = $params['id'];
+       
+       if (!is_numeric($id)) { return 1;}
        $img = './'.SYSTEM_IMAGES.'/nodes/'.substr($id,0,1)."/".substr($id,1,1)."/$id.gif";
 
        if (file_exists($img)) {
@@ -16,6 +18,7 @@ function smarty_function_get_image_link($params,&$smarty) {
                }
                echo $imglink;
        }
+       return 0;
 }
 
 ?>
This page took 0.227355 seconds and 4 git commands to generate.