fix Scrutinizer "bugs"

This commit is contained in:
Ralf Becker 2016-06-29 10:52:27 +02:00
parent 4b75ed5e7f
commit 7f3038f07e

View File

@ -637,11 +637,13 @@ class infolog_groupdav extends Api\CalDAV\Handler
if (!Api\Categories::is_global($task['info_cat']))
{
$cat_obj = new Api\Categories(Api\Categories::GLOBAL_ACCOUNT, 'infolog');
$cat = Api\Categories::read($task['info_cat']);
if (($cat = Api\Categories::read($task['info_cat'])))
{
$cat['owner'] = Api\Categories::GLOBAL_ACCOUNT;
$cat['access'] = 'public';
$cat_obj->edit($cat);
}
}
// if replace, remove user of old category from responsible
if ($action == 'replace' && $oldTask && $oldTask['info_cat'] &&
($old_cat = Api\Categories::id2name($oldTask['info_cat'])) && strpos($old_cat, '@') !== false &&