forked from extern/egroupware
link_title method returns now null to indicate an entry does not exist (and all links can be deleted) or false if there are insufficent rights to view the title
This commit is contained in:
parent
dde05aab4f
commit
dcd5d3f91a
@ -339,15 +339,18 @@ class bo_resources
|
||||
* @author Cornelius Weiss <egw@von-und-zu-weiss.de>
|
||||
* 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'].']':'');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user