diff options
Diffstat (limited to 'admin')
-rw-r--r-- | admin/cat_perm.php | 4 | ||||
-rw-r--r-- | 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 @@ <li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li> {/foreach} </ul> - <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}"> + <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> </fieldset> <h4>{'Users'|@translate}</h4> @@ -59,8 +59,8 @@ <li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li> {/foreach} </ul> - <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}"> + <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label> </fieldset> <input type="hidden" name="pwg_token" value="{$PWG_TOKEN}"> |