diff options
author | mistic100 <mistic@piwigo.org> | 2012-01-14 22:29:10 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2012-01-14 22:29:10 +0000 |
commit | c501688dbc98428635bdf569dc9c136e24fbd9a9 (patch) | |
tree | e60e9507668a8f508ddadf2b5b7fed333598d95d /profile.php | |
parent | a412558492bf24ee9c39502ac37730ff4bc40177 (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 'profile.php')
-rw-r--r-- | profile.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/profile.php b/profile.php index 01e5c8308..82b4421c8 100644 --- a/profile.php +++ b/profile.php @@ -256,8 +256,13 @@ function save_profile_from_post($userdata, &$errors) // update user "additional" informations (specific to Piwigo) $fields = array( 'nb_image_page', 'language', - 'expand', 'show_nb_comments', 'show_nb_hits', 'recent_period', 'theme' + 'expand', 'show_nb_hits', 'recent_period', 'theme' ); + + if ($conf['activate_comments']) + { + array_push($fields, 'show_nb_comments'); + } $data = array(); $data['user_id'] = $userdata['id']; @@ -300,6 +305,7 @@ function load_profile_in_template($url_action, $url_redirect, $userdata) 'USERNAME'=>stripslashes($userdata['username']), 'EMAIL'=>get_email_address_as_display_text(@$userdata['email']), 'ALLOW_USER_CUSTOMIZATION'=>$conf['allow_user_customization'], + 'ACTIVATE_COMMENTS'=>$conf['activate_comments'], 'NB_IMAGE_PAGE'=>$userdata['nb_image_page'], 'RECENT_PERIOD'=>$userdata['recent_period'], 'EXPAND' =>$userdata['expand'] ? 'true' : 'false', |