forked from extern/egroupware
A couple of small data caching in find_image().
This commit is contained in:
parent
7d1f940b00
commit
03358f1bfa
@ -334,7 +334,7 @@
|
||||
break;
|
||||
}
|
||||
/* If they want NOGIF policy, then I do a global replace */
|
||||
if ($GLOBALS['phpgw_info']['server']['image_type'] == 2)
|
||||
if (@$GLOBALS['phpgw_info']['server']['image_type'] == 2)
|
||||
{
|
||||
$str = str_replace ('.gif','.png',$str);
|
||||
}
|
||||
|
@ -776,7 +776,10 @@
|
||||
|
||||
function find_image($appname,$image)
|
||||
{
|
||||
switch($GLOBALS['phpgw_info']['server']['image_type'])
|
||||
static $imgpref;
|
||||
if(! @$imgpref)
|
||||
{
|
||||
switch(@$GLOBALS['phpgw_info']['server']['image_type'])
|
||||
{
|
||||
case 1:
|
||||
$imgpref = Array('png','jpg','gif');
|
||||
@ -786,8 +789,9 @@
|
||||
break;
|
||||
default:
|
||||
$imgpref = Array('gif','jpg','png');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!@is_array($this->found_files[$appname]))
|
||||
{
|
||||
$imagedir_olddefault = '/'.$appname.'/images';
|
||||
|
Loading…
Reference in New Issue
Block a user