Ignore:
Timestamp:
Jan 14, 2012, 11:29:10 PM (12 years ago)
Author:
mistic100
Message:

feature:2549 Allow to disable comments for everybody

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/cat_modify.php

    r12796 r12887  
    4949      'id' => $_GET['cat_id'],
    5050      'name' => @$_POST['name'],
    51       'commentable' => isset($_POST['commentable'])?$_POST['commentable']:'false',
    5251      'comment' =>
    5352        $conf['allow_html_descriptions'] ?
    5453          @$_POST['comment'] : strip_tags(@$_POST['comment']),
    5554      );
     55     
     56  if ($conf['activate_comments'])
     57  {
     58    $data['commentable'] = isset($_POST['commentable'])?$_POST['commentable']:'false';
     59  }
    5660
    5761  mass_updates(
     
    223227    'CAT_STATUS'        => $category['status'],
    224228    'CAT_VISIBLE'       => boolean_to_string($category['visible']),
    225     'CAT_COMMENTABLE'   => boolean_to_string($category['commentable']),
    226229
    227230    'U_JUMPTO' => make_index_url(
     
    239242    )
    240243  );
     244 
     245if ($conf['activate_comments'])
     246{
     247  $template->assign('CAT_COMMENTABLE', boolean_to_string($category['commentable']));
     248}
    241249
    242250
Note: See TracChangeset for help on using the changeset viewer.