now only removes all gifs is policy is set

This commit is contained in:
seek3r 2002-01-21 19:04:57 +00:00
parent 0a001801f9
commit 3b939f5158
2 changed files with 15 additions and 10 deletions

View File

@ -333,8 +333,11 @@
$str = preg_replace('/{([^ \t\r\n}]+)}/', "<!-- Template $handle: Variable \\1 undefined -->", $str);
break;
}
/* If they want NOGIF policy, then I do a global replace */
if ($GLOBALS['phpgw_info']['server']['imgtype_preference'] == 2)
{
$str = str_replace (".gif", ".png",$str);
}
return $str;
}

View File

@ -776,14 +776,16 @@
function find_image($appname,$image)
{
if (!isset($GLOBALS['phpgw_info']['server']['imgtype_preference_order']))
switch($GLOBALS['phpgw_info']['server']['imgtype_preference'])
{
case 1:
$imgpref = Array('gif','jpg','png');
}
else
{
$imgpref = $GLOBALS['phpgw_info']['server']['imgtype_preference_order'];
break;
case 2:
$imgpref = Array('png','jpg','nogifs');
break;
default:
$imgpref = Array('png','jpg','gif');
}
if (!@is_array($this->found_files[$appname]))