From 64e1ce3cd33f850e11cea4feb133fd7842da2248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=B3na=20Lore?= Date: Fri, 1 Jan 2016 14:05:42 +0100 Subject: [PATCH] Hide "Reply" button on comment items for anonymous users if "anon_post" is disabled. --- e107_core/shortcodes/batch/comment_shortcodes.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/e107_core/shortcodes/batch/comment_shortcodes.php b/e107_core/shortcodes/batch/comment_shortcodes.php index 560cc7713..a97f897c4 100644 --- a/e107_core/shortcodes/batch/comment_shortcodes.php +++ b/e107_core/shortcodes/batch/comment_shortcodes.php @@ -99,11 +99,14 @@ class comment_shortcodes extends e_shortcode $pref = e107::getPref(); $REPLY = ''; - if($this->var['comment_lock'] != "1" && $this->var['comment_blocked'] < 1) + if(USERID || $pref['anon_post'] == 1) { - if ($thisaction == "comment" && $pref['nested_comments']) + if($this->var['comment_lock'] != "1" && $this->var['comment_blocked'] < 1) { - $REPLY = "".COMLAN_326.""; + if ($thisaction == "comment" && $pref['nested_comments']) + { + $REPLY = "".COMLAN_326.""; + } } } return $REPLY;