aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2012-08-14 18:53:43 +0000
committerflop25 <flop25@piwigo.org>2012-08-14 18:53:43 +0000
commit411d0d59837941d4040f364f9f90ad66a6cbc410 (patch)
treec6a6882275f69a5e5991cffda0ac329dc33cc599
parentb97f82ddc02b58b1b6b146fd97c2f6bee07a065b (diff)
bug:2719
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
-rw-r--r--admin/cat_perm.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/admin/cat_perm.php b/admin/cat_perm.php
index d5c41edf7..ac9d9d9d2 100644
--- a/admin/cat_perm.php
+++ b/admin/cat_perm.php
@@ -90,7 +90,7 @@ DELETE
//
// 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']));
@@ -98,7 +98,7 @@ DELETE
{
$cat_ids = array_merge($cat_ids, get_subcat_ids(array($page['cat'])));
}
-
+
$query = '
SELECT id
FROM '.CATEGORIES_TABLE.'
@@ -113,7 +113,7 @@ SELECT id
{
$granteds[$cat_id] = array();
}
-
+
$query = '
SELECT
group_id,
@@ -183,7 +183,7 @@ DELETE
//
// 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);