diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 4ae0cda17a..0381f024b4 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -339,15 +339,18 @@ class bo_resources * @author Cornelius Weiss * get title for an infolog entry identified by $res_id * + * @return string/boolean string with title, null if resource does not exist or false if no perms to view it */ function link_title( $resource ) { - if (!is_array($resource) && $resource > 0) + if (!is_array($resource)) { - $resource = $this->so->read(array('res_id' => $resource)); - $title = $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':''); + if (!($resource = $this->so->read(array('res_id' => $resource)))) return null; } - return $title ? $title : false; + // ToDo Conny: ACL check !!! + //if (!$this->check_acl($resource,EGW_ACL_READ)) return false; + + return $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':''); } /**