Skip to content

Commit

Permalink
feature:2418
Browse files Browse the repository at this point in the history
adding an option to apply permission of group to sub-albums

git-svn-id: http://piwigo.org/svn/trunk@12017 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
flop25 committed Aug 31, 2011
1 parent 2d52f65 commit dbf1ba4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion admin/cat_perm.php
Expand Up @@ -88,10 +88,12 @@
and isset($_POST['grant_groups'])
and count($_POST['grant_groups']) > 0)
{
$cat_ids = (isset($_POST['apply_on_sub'])) ? implode(',', get_subcat_ids(array($page['cat']))).",".implode(',', get_uppercat_ids(array($page['cat']))) : implode(',', get_uppercat_ids(array($page['cat'])));

$query = '
SELECT id
FROM '.CATEGORIES_TABLE.'
WHERE id IN ('.implode(',', get_uppercat_ids(array($page['cat']))).')
WHERE id IN ('.$cat_ids.')
AND status = \'private\'
;';
$private_uppercats = array_from_query($query, 'id');
Expand Down
1 change: 1 addition & 0 deletions admin/themes/default/template/cat_perm.tpl
Expand Up @@ -25,6 +25,7 @@
<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-album'|@translate}</label>
<input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}">
</fieldset>

Expand Down

0 comments on commit dbf1ba4

Please sign in to comment.