Changeset 12017


Ignore:
Timestamp:
08/31/11 15:25:07 (8 years ago)
Author:
flop25
Message:

feature:2418
adding an option to apply permission of group to sub-albums

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_perm.php

    r11729 r12017  
    8989         and count($_POST['grant_groups']) > 0) 
    9090{ 
     91  $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']))); 
     92 
    9193  $query = ' 
    9294SELECT id 
    9395  FROM '.CATEGORIES_TABLE.' 
    94   WHERE id IN ('.implode(',', get_uppercat_ids(array($page['cat']))).') 
     96  WHERE id IN ('.$cat_ids.') 
    9597  AND status = \'private\' 
    9698;'; 
  • trunk/admin/themes/default/template/cat_perm.tpl

    r8128 r12017  
    2626      {/foreach} 
    2727    </ul> 
     28    <label><input type="checkbox" name="apply_on_sub">{'Apply to sub-album'|@translate}</label> 
    2829    <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}"> 
    2930  </fieldset> 
Note: See TracChangeset for help on using the changeset viewer.