merge r12825 from trunk to branch 2.3 bug:2546 fixed:

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/branches/2.3@12826 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
flop25
2012-01-02 16:41:18 +00:00
parent 43968c37f4
commit 05663d3bee
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -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']);
}
+3 -3
View File
@@ -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,9 +59,9 @@
<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}">
</fieldset>
<label><input type="checkbox" name="apply_on_sub">{'Apply to sub-albums'|@translate}</label>
</fieldset>
<input type="hidden" name="pwg_token" value="{$PWG_TOKEN}">
</form>