fixed fallback to images in the api-dir, did not work if no api-image was used before

This commit is contained in:
Ralf Becker 2003-12-18 06:11:08 +00:00
parent 3511e9d103
commit 2aa000eac8

View File

@ -935,25 +935,34 @@
{ {
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$image].'/'.$image; $imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files[$appname][$image].'/'.$image;
} }
elseif(isset($this->found_files['phpgwapi'][$image.'.png']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.png'].'/'.$image.'.png';
}
elseif(isset($this->found_files['phpgwapi'][$image.'.jpg']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.jpg'].'/'.$image.'.jpg';
}
elseif(isset($this->found_files['phpgwapi'][$image.'.gif']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.gif'].'/'.$image.'.gif';
}
elseif(isset($this->found_files['phpgwapi'][$image]))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image].'/'.$image;
}
else else
{ {
$imgfile = ''; // searching the image in the api-dirs
if (!isset($this->found_files['phpgwapi']))
{
$this->find_image('phpgwapi','');
}
if(isset($this->found_files['phpgwapi'][$image.'.png']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.png'].'/'.$image.'.png';
}
elseif(isset($this->found_files['phpgwapi'][$image.'.jpg']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.jpg'].'/'.$image.'.jpg';
}
elseif(isset($this->found_files['phpgwapi'][$image.'.gif']))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image.'.gif'].'/'.$image.'.gif';
}
elseif(isset($this->found_files['phpgwapi'][$image]))
{
$imgfile = $GLOBALS['phpgw_info']['server']['webserver_url'].$this->found_files['phpgwapi'][$image].'/'.$image;
}
else
{
$imgfile = '';
}
} }
return $imgfile; return $imgfile;
} }