diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 056f9e55cd..8bc97ae01b 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -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; } diff --git a/resources/inc/class.ui_resources.inc.php b/resources/inc/class.ui_resources.inc.php index d4abedd310..f32ecf940c 100755 --- a/resources/inc/class.ui_resources.inc.php +++ b/resources/inc/class.ui_resources.inc.php @@ -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'