fixed bug in image and submit-button, that caused names containing '.' to be truncated at the first dot

This commit is contained in:
Ralf Becker 2004-02-19 22:35:38 +00:00
parent 06ab7f4476
commit 597f99375c

View File

@ -201,10 +201,8 @@
if ($image != '') if ($image != '')
{ {
if (strpos($image,'.')) $image = str_replace(array('.gif','.GIF','.png','.PNG'),'',$image);
{
$image = substr($image,0,strpos($image,'.'));
}
if (!($path = $GLOBALS['phpgw']->common->image($app,$image))) if (!($path = $GLOBALS['phpgw']->common->image($app,$image)))
{ {
$path = $image; // name may already contain absolut path $path = $image; // name may already contain absolut path
@ -351,10 +349,8 @@
function image( $app,$name,$title='',$options='' ) function image( $app,$name,$title='',$options='' )
{ {
if (strpos($name,'.')) $name = str_replace(array('.gif','.GIF','.png','.PNG'),'',$name);
{
$name = substr($name,0,strpos($name,'.'));
}
if (!($path = $GLOBALS['phpgw']->common->image($app,$name))) if (!($path = $GLOBALS['phpgw']->common->image($app,$name)))
{ {
$path = $name; // name may already contain absolut path $path = $name; // name may already contain absolut path