Skip to content

Commit

Permalink
Issue ID 334:
Browse files Browse the repository at this point in the history
  o Fix problem with field adviser when allow_adiviser is false


git-svn-id: http://piwigo.org/svn/trunk@1170 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rub committed Apr 14, 2006
1 parent aa8238d commit 0d1eb2e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions admin/user_list.php
Expand Up @@ -338,9 +338,14 @@ function get_filtered_user_list()
$formfields =
array('nb_image_line', 'nb_line_page', 'template', 'language',
'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
'maxheight', 'status', 'adviser', 'enabled_high');
'maxheight', 'status', 'enabled_high');

$true_false_fields = array('expand', 'show_nb_comments', 'adviser', 'enabled_high');
$true_false_fields = array('expand', 'show_nb_comments', 'enabled_high');
if ($conf['allow_adviser'])
{
array_push($formfields, 'adviser');
array_push($true_false_fields, 'adviser');
}

foreach ($formfields as $formfield)
{
Expand Down Expand Up @@ -581,8 +586,8 @@ function get_filtered_user_list()
// echo '<pre>'; print_r($_POST); echo '</pre>';
$template->assign_vars(
array(
'ADVISER_YES' => 'true' == $_POST['adviser'] ? 'checked="checked"' : '',
'ADVISER_NO' => 'false' == $_POST['adviser'] ? 'checked="checked"' : '',
'ADVISER_YES' => 'true' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
'ADVISER_NO' => 'false' == (isset($_POST['adviser']) and $_POST['adviser']) ? 'checked="checked"' : '',
'NB_IMAGE_LINE' => $_POST['nb_image_line'],
'NB_LINE_PAGE' => $_POST['nb_line_page'],
'MAXWIDTH' => $_POST['maxwidth'],
Expand Down

0 comments on commit 0d1eb2e

Please sign in to comment.