aboutsummaryrefslogtreecommitdiffstats
path: root/admin/user_list.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-01-14 22:29:10 +0000
committermistic100 <mistic@piwigo.org>2012-01-14 22:29:10 +0000
commitc501688dbc98428635bdf569dc9c136e24fbd9a9 (patch)
treee60e9507668a8f508ddadf2b5b7fed333598d95d /admin/user_list.php
parenta412558492bf24ee9c39502ac37730ff4bc40177 (diff)
feature:2549 Allow to disable comments for everybody
git-svn-id: http://piwigo.org/svn/trunk@12887 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/user_list.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/admin/user_list.php b/admin/user_list.php
index 425c3c698..8a8396792 100644
--- a/admin/user_list.php
+++ b/admin/user_list.php
@@ -415,14 +415,19 @@ DELETE FROM '.USER_GROUP_TABLE.'
$datas = array();
$dbfields = array('primary' => array('user_id'), 'update' => array());
- $formfields =
- array('nb_image_page', 'theme', 'language',
- 'recent_period', 'expand', 'show_nb_comments',
- 'show_nb_hits', 'status', 'enabled_high',
- 'level');
-
- $true_false_fields = array('expand', 'show_nb_comments',
- 'show_nb_hits', 'enabled_high');
+ $formfields = array(
+ 'nb_image_page', 'theme', 'language',
+ 'recent_period', 'expand', 'show_nb_hits',
+ 'status', 'enabled_high', 'level'
+ );
+
+ $true_false_fields = array('expand', 'show_nb_hits', 'enabled_high');
+
+ if ($conf['activate_comments'])
+ {
+ array_push($formfields, 'show_nb_comments');
+ array_push($true_false_fields, 'show_nb_comments');
+ }
foreach ($formfields as $formfield)
{
@@ -555,7 +560,9 @@ $template->assign(
'F_ADD_ACTION' => $base_url,
'F_USERNAME' => @htmlentities($_GET['username'], ENT_COMPAT, 'UTF-8'),
- 'F_FILTER_ACTION' => get_root_url().'admin.php'
+ 'F_FILTER_ACTION' => get_root_url().'admin.php',
+
+ 'ACTIVATE_COMMENTS' => $conf['activate_comments'],
));
// Display or Hide double password type