Changeset 1171 for branches/branch-1_6


Ignore:
Timestamp:
Apr 14, 2006, 10:57:16 PM (19 years ago)
Author:
rub
Message:

Issue ID 334:

o Fix problem with field adviser when allow_adiviser is false

Report of svn:1170

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/branch-1_6/admin/user_list.php

    r1087 r1171  
    339339    array('nb_image_line', 'nb_line_page', 'template', 'language',
    340340          'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
    341           'maxheight', 'status', 'adviser', 'enabled_high');
    342  
    343   $true_false_fields = array('expand', 'show_nb_comments', 'adviser', 'enabled_high');
     341          'maxheight', 'status', 'enabled_high');
     342 
     343  $true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
     344  if ($conf['allow_adviser'])
     345  {
     346    array_push($formfields, 'adviser');
     347    array_push($true_false_fields, 'adviser');
     348  }
    344349 
    345350  foreach ($formfields as $formfield)
     
    582587  $template->assign_vars(
    583588    array(
    584       'ADVISER_YES' => 'true' == $_POST['adviser'] ? 'checked="checked"' : '',
    585       'ADVISER_NO' => 'false' == $_POST['adviser'] ? 'checked="checked"' : '',
     589      'ADVISER_YES' => 'true' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
     590      'ADVISER_NO' => 'false' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
    586591      'NB_IMAGE_LINE' => $_POST['nb_image_line'],
    587592      'NB_LINE_PAGE' => $_POST['nb_line_page'],
Note: See TracChangeset for help on using the changeset viewer.