Skip to content

Commit

Permalink
bug:2719
Browse files Browse the repository at this point in the history
no need to array diff : the system check after to not reinsert existing lines

git-svn-id: http://piwigo.org/svn/trunk@17561 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
flop25 committed Aug 14, 2012
1 parent b97f82d commit 411d0d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions admin/cat_perm.php
Expand Up @@ -90,15 +90,15 @@
//
// add permissions to groups
//
$grant_groups = array_diff($_POST['groups'], $groups_granted);
$grant_groups = $_POST['groups'];
if (count($grant_groups) > 0)
{
$cat_ids = get_uppercat_ids(array($page['cat']));
if (isset($_POST['apply_on_sub']))
{
$cat_ids = array_merge($cat_ids, get_subcat_ids(array($page['cat'])));
}

$query = '
SELECT id
FROM '.CATEGORIES_TABLE.'
Expand All @@ -113,7 +113,7 @@
{
$granteds[$cat_id] = array();
}

$query = '
SELECT
group_id,
Expand Down Expand Up @@ -183,7 +183,7 @@
//
// add permissions to users
//
$grant_users = array_diff($_POST['users'], $users_granted);
$grant_users = $_POST['users'];
if (count($grant_users) > 0)
{
add_permission_on_category($page['cat'], $grant_users);
Expand Down

0 comments on commit 411d0d5

Please sign in to comment.