From: niekt0 Date: Mon, 4 Apr 2011 20:49:47 +0000 (+0200) Subject: get_image_link_fast fix X-Git-Url: https://git.harvie.cz/?a=commitdiff_plain;h=37e8d23972984a127bec7c4faa237e5a80e1068e;p=mirrors%2FKyberia-bloodline.git get_image_link_fast fix --- diff --git a/wwwroot/inc/smarty/node_methodz/function.get_image_link_fast.php b/wwwroot/inc/smarty/node_methodz/function.get_image_link_fast.php index d106916..3220d7c 100644 --- a/wwwroot/inc/smarty/node_methodz/function.get_image_link_fast.php +++ b/wwwroot/inc/smarty/node_methodz/function.get_image_link_fast.php @@ -7,9 +7,9 @@ function smarty_function_get_image_link_fast($params,&$smarty) { $id = $params['id']; if (!is_numeric($id)) { $id=0;} - $img = './'.SYSTEM_IMAGES.'/nodes/'.substr($id,0,1)."/".substr($id,1,1)."/$id.gif"; + $img = SYSTEM_IMAGES.'nodes/'.substr($id,0,1)."/".substr($id,1,1)."/$id.gif"; - if (file_exists($img)) { echo "$img"; } - else { echo SYSTEM_IMAGES.'/nodes///.gif'; } + if (file_exists('./'.$img)) { echo "$img"; } + else { echo SYSTEM_IMAGES.'nodes/.gif'; } } ?>