aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-04-04 22:00:29 +0000
committerplegall <plg@piwigo.org>2010-04-04 22:00:29 +0000
commit7424433a54b5a099b3c702a5bada67da661ec4e5 (patch)
tree879a4049a7d7129de8746236658264b67f2a527d
parent69756042c7d893a551ba7c0e1f1224b7c70ff397 (diff)
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
Diffstat (limited to '')
-rw-r--r--include/picture_comment.inc.php14
1 files changed, 11 insertions, 3 deletions
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 = '';