This commit is contained in:
Ralf Becker 2007-05-09 08:07:06 +00:00
parent 8dc321cfe3
commit 20fcee771b
2 changed files with 5 additions and 5 deletions

View File

@ -492,7 +492,7 @@ class bo_resources
case 'gen_src':
default :
$picture = $GLOBALS['egw_info']['server']['webserver_url'].$this->resource_icons;
$picture .= strstr($src,'.') ? $src : 'generic.png';
$picture .= strpos($src,'.') !== false ? $src : 'generic.png';
}
return $picture;
}

View File

@ -219,8 +219,8 @@ class ui_resources
if ($res_id > 0)
{
$content = $this->bo->read($res_id);
$content['gen_src_list'] = strstr($content['picture_src'],'.') ? $content['picture_src'] : false;
$content['picture_src'] = strstr($content['picture_src'],'.') ? 'gen_src' : $content['picture_src'];
$content['gen_src_list'] = strpos($content['picture_src'],'.') !== false ? $content['picture_src'] : false;
$content['picture_src'] = strpos($content['picture_src'],'.') !== false ? 'gen_src' : $content['picture_src'];
$content['link_to'] = array(
'to_id' => $res_id,
'to_app' => 'resources'
@ -310,8 +310,8 @@ class ui_resources
$content = array('res_id' => $res_id);
$content = $this->bo->read($res_id);
$content['gen_src_list'] = strstr($content['picture_src'],'.') ? $content['picture_src'] : false;
$content['picture_src'] = strstr($content['picture_src'],'.') ? 'gen_src' : $content['picture_src'];
$content['gen_src_list'] = strpos($content['picture_src'],'.') !== false ? $content['picture_src'] : false;
$content['picture_src'] = strpos($content['picture_src'],'.') !== false ? 'gen_src' : $content['picture_src'];
$content['link_to'] = array(
'to_id' => $res_id,
'to_app' => 'resources'