(cp b31d68f) fixes #1182 with inheritance_by_default, copy only permissions from parents and do not add admins

This commit is contained in:
plegall
2020-05-07 12:31:18 +02:00
parent 27e75c39cf
commit 6db8da47ea
2 changed files with 2 additions and 9 deletions
+1 -8
View File
@@ -314,7 +314,7 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
pwg_activity('album', $category_ids, 'add', array('sync'=>true));
$category_up=implode(',',array_unique($category_up));
if ($conf['inheritance_by_default'])
if ($conf['inheritance_by_default'] and !empty($category_up))
{
$query = '
SELECT *
@@ -395,13 +395,6 @@ SELECT id_uppercat, MAX(`rank`)+1 AS next_rank
);
}
}
foreach (get_admins() as $granted_user)
{
$insert_granted_users[] = array(
'user_id' => $granted_user,
'cat_id' => $ids
);
}
}
}
mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $insert_granted_grps);