quieten warning in delete-category hook, if cat is not used

This commit is contained in:
Ralf Becker 2012-08-09 08:25:53 +00:00
parent b181ab1f3f
commit 0c5ca986c6

View File

@ -1589,10 +1589,10 @@ class addressbook_bo extends addressbook_so
// Get addresses that use the category
@set_time_limit( 0 );
$ids = array();
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));
@ -1600,6 +1600,7 @@ class addressbook_bo extends addressbook_so
}
}
}
}
/**
* Called by edit-account hook, when an account get edited --> not longer used