From: niekt0 Date: Tue, 15 Mar 2011 01:27:35 +0000 (+0100) Subject: get_image_link fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=e8de5ed331aefaba360e34d85923afebc37f1b17;p=mirrors%2FKyberia-bloodline.git get_image_link 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 a391aa0..ca181f3 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_image_link.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_image_link.php @@ -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; } ?>