aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_list.php
diff options
context:
space:
mode:
authorrub <rub@piwigo.org>2006-04-14 20:57:16 +0000
committerrub <rub@piwigo.org>2006-04-14 20:57:16 +0000
commitc5fa25261540a813022699756e3753abad159317 (patch)
tree0d0888ce6de07ae0b7f2bebbabc515929c07875d /admin/user_list.php
parent2d185bf1490a275543d8fffeb98718654554a1a2 (diff)
Issue ID 334:
o Fix problem with field adviser when allow_adiviser is false Report of svn:1170 git-svn-id: http://piwigo.org/svn/branches/branch-1_6@1171 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/user_list.php')
-rw-r--r--admin/user_list.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index 532d64783..2fffbcd34 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -338,9 +338,14 @@ DELETE FROM '.USER_GROUP_TABLE.'
$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)
{
@@ -581,8 +586,8 @@ if (isset($_POST['pref_submit']))
// 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'],