From 597f99375cd87b0e8dfd866b7edc8b6c58060bad Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 19 Feb 2004 22:35:38 +0000 Subject: [PATCH] fixed bug in image and submit-button, that caused names containing '.' to be truncated at the first dot --- phpgwapi/inc/class.html.inc.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/phpgwapi/inc/class.html.inc.php b/phpgwapi/inc/class.html.inc.php index 2adba89ebf..7eb8e230bc 100644 --- a/phpgwapi/inc/class.html.inc.php +++ b/phpgwapi/inc/class.html.inc.php @@ -201,10 +201,8 @@ if ($image != '') { - if (strpos($image,'.')) - { - $image = substr($image,0,strpos($image,'.')); - } + $image = str_replace(array('.gif','.GIF','.png','.PNG'),'',$image); + if (!($path = $GLOBALS['phpgw']->common->image($app,$image))) { $path = $image; // name may already contain absolut path @@ -351,10 +349,8 @@ function image( $app,$name,$title='',$options='' ) { - if (strpos($name,'.')) - { - $name = substr($name,0,strpos($name,'.')); - } + $name = str_replace(array('.gif','.GIF','.png','.PNG'),'',$name); + if (!($path = $GLOBALS['phpgw']->common->image($app,$name))) { $path = $name; // name may already contain absolut path