mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
A couple of small data caching in find_image().
This commit is contained in:
parent
7d1f940b00
commit
03358f1bfa
@ -334,9 +334,9 @@
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* If they want NOGIF policy, then I do a global replace */
|
/* 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);
|
$str = str_replace ('.gif','.png',$str);
|
||||||
}
|
}
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
@ -776,18 +776,22 @@
|
|||||||
|
|
||||||
function find_image($appname,$image)
|
function find_image($appname,$image)
|
||||||
{
|
{
|
||||||
switch($GLOBALS['phpgw_info']['server']['image_type'])
|
static $imgpref;
|
||||||
|
if(! @$imgpref)
|
||||||
{
|
{
|
||||||
case 1:
|
switch(@$GLOBALS['phpgw_info']['server']['image_type'])
|
||||||
$imgpref = Array('png','jpg','gif');
|
{
|
||||||
break;
|
case 1:
|
||||||
case 2:
|
$imgpref = Array('png','jpg','gif');
|
||||||
$imgpref = Array('png','jpg','nogifs');
|
break;
|
||||||
break;
|
case 2:
|
||||||
default:
|
$imgpref = Array('png','jpg','nogifs');
|
||||||
$imgpref = Array('gif','jpg','png');
|
break;
|
||||||
|
default:
|
||||||
|
$imgpref = Array('gif','jpg','png');
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!@is_array($this->found_files[$appname]))
|
if (!@is_array($this->found_files[$appname]))
|
||||||
{
|
{
|
||||||
$imagedir_olddefault = '/'.$appname.'/images';
|
$imagedir_olddefault = '/'.$appname.'/images';
|
||||||
|
Loading…
Reference in New Issue
Block a user