mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
quieten warning in delete-category hook, if cat is not used
This commit is contained in:
parent
19e0910ce0
commit
ac7d79309e
@ -1588,14 +1588,15 @@ class addressbook_bo extends addressbook_so
|
|||||||
|
|
||||||
// Get addresses that use the category
|
// Get addresses that use the category
|
||||||
@set_time_limit( 0 );
|
@set_time_limit( 0 );
|
||||||
$ids = array();
|
|
||||||
foreach($cat_ids as $cat_id)
|
foreach($cat_ids as $cat_id)
|
||||||
{
|
{
|
||||||
$ids = $this->search(array('cat_id' => $cat_id), false);
|
if (($ids = $this->search(array('cat_id' => $cat_id), false)))
|
||||||
foreach($ids as &$info)
|
|
||||||
{
|
{
|
||||||
$info['cat_id'] = implode(',',array_diff(explode(',',$info['cat_id']), $cat_ids));
|
foreach($ids as &$info)
|
||||||
$this->save($info);
|
{
|
||||||
|
$info['cat_id'] = implode(',',array_diff(explode(',',$info['cat_id']), $cat_ids));
|
||||||
|
$this->save($info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user