Changeset 29265


Ignore:
Timestamp:
08/24/14 22:56:41 (6 years ago)
Author:
flop25
Message:

feature:3126
Apply on subalbum checkbox about comments

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r29229 r29265  
    133133    array('id' => $data['id']) 
    134134    ); 
     135  if ($_POST['apply_commentable_on_sub']) 
     136  { 
     137    $subcats = get_subcat_ids(array('id' => $data['id'])); 
     138    $query = ' 
     139UPDATE '.CATEGORIES_TABLE.' 
     140  SET commentable = \''.$data['commentable'].'\' 
     141  WHERE id IN ('.implode(',', $subcats).') 
     142;'; 
     143    pwg_query($query); 
     144  } 
    135145 
    136146  // retrieve cat infos before continuing (following updates are expensive) 
  • trunk/admin/themes/default/template/cat_modify.tpl

    r29229 r29265  
    126126    <br> 
    127127                {html_radios name='commentable' values=['false','true'] output=['No'|translate,'Yes'|translate] selected=$CAT_COMMENTABLE} 
     128    <label id="applytoSubAction"> 
     129      <input type="checkbox" name="apply_commentable_on_sub"> 
     130      {'Apply to sub-albums'|@translate} 
     131    </label> 
    128132  </p> 
    129133  {/if} 
Note: See TracChangeset for help on using the changeset viewer.