diff options
Diffstat (limited to 'admin/user_perm.php')
-rw-r--r-- | admin/user_perm.php | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/admin/user_perm.php b/admin/user_perm.php index 478d0386d..e40c064c2 100644 --- a/admin/user_perm.php +++ b/admin/user_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 | // +-----------------------------------------------------------------------+ @@ -64,7 +64,9 @@ DELETE FROM '.USER_ACCESS_TABLE.' ;'; pwg_query($query); } -else if (isset($_POST['trueify'])) +elseif (isset($_POST['trueify']) + and isset($_POST['cat_false']) + and count($_POST['cat_false']) > 0) { add_permission_on_category($_POST['cat_false'], $page['user']); } @@ -83,10 +85,9 @@ $template->set_filenames( $template->assign( array( 'TITLE' => - sprintf( - l10n('Manage permissions for user "%s"'), - get_username($page['user'] - ) + l10n( + 'Manage permissions for user "%s"', + get_username($page['user']) ), 'L_CAT_OPTIONS_TRUE'=>l10n('Authorized'), 'L_CAT_OPTIONS_FALSE'=>l10n('Forbidden'), @@ -118,8 +119,8 @@ if (pwg_db_num_rows($result) > 0) $cats = array(); while ($row = pwg_db_fetch_assoc($result)) { - array_push($cats, $row); - array_push($group_authorized, $row['cat_id']); + $cats[] = $row; + $group_authorized[] = $row['cat_id']; } usort($cats, 'global_rank_compare'); @@ -127,7 +128,7 @@ if (pwg_db_num_rows($result) > 0) { $template->append( 'categories_because_of_groups', - get_cat_display_name_cache($category['uppercats'], null, false) + get_cat_display_name_cache($category['uppercats'], null) ); } } @@ -151,7 +152,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 = ' |