mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
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
7630412a9e
commit
2bf64c906d
@ -324,7 +324,11 @@ class bo_resources
|
|||||||
{
|
{
|
||||||
$criteria = array('name' => $pattern, 'short_description' => $pattern);
|
$criteria = array('name' => $pattern, 'short_description' => $pattern);
|
||||||
$only_keys = 'res_id,name,short_description';
|
$only_keys = 'res_id,name,short_description';
|
||||||
$data = $this->so->search($criteria,$only_keys,$order_by='',$extra_cols='',$wildcard='%',$empty,$op='OR');
|
$filter = array(
|
||||||
|
'cat_id' => array_flip((array)$this->acl->get_cats(EGW_ACL_READ)),
|
||||||
|
//'accessory_of' => '-1'
|
||||||
|
);
|
||||||
|
$data = $this->so->search($criteria,$only_keys,$order_by='',$extra_cols='',$wildcard='%',$empty,$op='OR','',$filter);
|
||||||
foreach($data as $num => $resource)
|
foreach($data as $num => $resource)
|
||||||
{
|
{
|
||||||
if($num != 0)
|
if($num != 0)
|
||||||
@ -347,8 +351,7 @@ class bo_resources
|
|||||||
{
|
{
|
||||||
if (!($resource = $this->so->read(array('res_id' => $resource)))) return null;
|
if (!($resource = $this->so->read(array('res_id' => $resource)))) return null;
|
||||||
}
|
}
|
||||||
// ToDo Conny: ACL check !!!
|
if(!$this->acl->is_permitted($resource['cat_id'],EGW_ACL_READ)) return false;
|
||||||
//if (!$this->check_acl($resource,EGW_ACL_READ)) return false;
|
|
||||||
|
|
||||||
return $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':'');
|
return $resource['name']. ($resource['short_description'] ? ', ['.$resource['short_description'].']':'');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user