From 7424433a54b5a099b3c702a5bada67da661ec4e5 Mon Sep 17 00:00:00 2001 From: plegall Date: Sun, 4 Apr 2010 22:00:29 +0000 Subject: bug 1534: if you're a guest, if configuration tells you can't add user comments, you won't see the form on the picture page. git-svn-id: http://piwigo.org/svn/trunk@5649 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/picture_comment.inc.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/picture_comment.inc.php') diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php index fe1e18c11..2f0198b22 100644 --- a/include/picture_comment.inc.php +++ b/include/picture_comment.inc.php @@ -211,9 +211,17 @@ $validated_clause.' } } - if (!is_a_guest() - or (is_a_guest() and $conf['comments_forall']) - or (empty($edit_comment))) + $show_add_comment_form = true; + if (isset($edit_comment)) + { + $show_add_comment_form = false; + } + if (is_a_guest() and !$conf['comments_forall']) + { + $show_add_comment_form = false; + } + + if ($show_add_comment_form) { $key = get_comment_post_key($page['image_id']); $content = ''; -- cgit v1.2.3