From 9e95ed515d8b05072f49e9d216317a1d691d3b60 Mon Sep 17 00:00:00 2001 From: flop25 Date: Mon, 2 Jan 2012 15:55:47 +0000 Subject: checkbox "apply on sub" after the button better "if isset" to avoid errors if no user have been selected git-svn-id: http://piwigo.org/svn/trunk@12825 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/cat_perm.php | 4 +++- admin/themes/default/template/cat_perm.tpl | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/cat_perm.php b/admin/cat_perm.php index c6e26462a..f2dbb3b4a 100644 --- a/admin/cat_perm.php +++ b/admin/cat_perm.php @@ -148,7 +148,9 @@ DELETE ;'; pwg_query($query); } -else if (isset($_POST['grant_users_submit'])) +else if (isset($_POST['grant_users_submit']) + and isset($_POST['grant_users']) + and count($_POST['grant_users']) > 0) { add_permission_on_category($page['cat'], $_POST['grant_users']); } diff --git a/admin/themes/default/template/cat_perm.tpl b/admin/themes/default/template/cat_perm.tpl index 03a2822d9..4e1a202a0 100644 --- a/admin/themes/default/template/cat_perm.tpl +++ b/admin/themes/default/template/cat_perm.tpl @@ -25,8 +25,8 @@
  • {/foreach} - +

    {'Users'|@translate}

    @@ -59,8 +59,8 @@
  • {/foreach} - + -- cgit v1.2.3