diff options
Diffstat (limited to 'admin/group_perm.php')
-rw-r--r-- | admin/group_perm.php | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/admin/group_perm.php b/admin/group_perm.php index 1be0c80b7..28ea48111 100644 --- a/admin/group_perm.php +++ b/admin/group_perm.php @@ -2,7 +2,7 @@ // +-----------------------------------------------------------------------+ // | Piwigo - a PHP based photo gallery | // +-----------------------------------------------------------------------+ -// | Copyright(C) 2008-2013 Piwigo Team http://piwigo.org | +// | Copyright(C) 2008-2014 Piwigo Team http://piwigo.org | // | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net | // | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick | // +-----------------------------------------------------------------------+ @@ -81,7 +81,7 @@ SELECT id $result = pwg_query($query); while ($row = pwg_db_fetch_assoc($result)) { - array_push($private_uppercats, $row['id']); + $private_uppercats[] = $row['id']; } // retrying to authorize a category which is already authorized may cause @@ -98,23 +98,21 @@ SELECT cat_id while ($row = pwg_db_fetch_assoc($result)) { - array_push($authorized_ids, $row['cat_id']); + $authorized_ids[] = $row['cat_id']; } $inserts = array(); $to_autorize_ids = array_diff($private_uppercats, $authorized_ids); foreach ($to_autorize_ids as $to_autorize_id) { - array_push( - $inserts, - array( - 'group_id' => $page['group'], - 'cat_id' => $to_autorize_id - ) + $inserts[] = array( + 'group_id' => $page['group'], + 'cat_id' => $to_autorize_id ); } mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $inserts); + invalidate_user_cache(); } // +-----------------------------------------------------------------------+ @@ -131,10 +129,9 @@ $template->set_filenames( $template->assign( array( 'TITLE' => - sprintf( - l10n('Manage permissions for group "%s"'), - get_groupname($page['group'] - ) + l10n( + 'Manage permissions for group "%s"', + get_groupname($page['group']) ), 'L_CAT_OPTIONS_TRUE'=>l10n('Authorized'), 'L_CAT_OPTIONS_FALSE'=>l10n('Forbidden'), @@ -159,7 +156,7 @@ $result = pwg_query($query_true); $authorized_ids = array(); while ($row = pwg_db_fetch_assoc($result)) { - array_push($authorized_ids, $row['id']); + $authorized_ids[] = $row['id']; } $query_false = ' |