1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Hide "Reply" button on comment items for anonymous users if "anon_post" is disabled.

This commit is contained in:
Lóna Lore
2016-01-01 14:05:42 +01:00
parent 832b70a9d6
commit 64e1ce3cd3

View File

@@ -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 = "<a id='e-comment-reply-".$this->var['comment_id']."' class='e-comment-reply btn btn-default btn-mini btn-xs' data-type='".$this->var['comment_type']."' data-target='".e_HTTP."comment.php' href='".e_HTTP."comment.php?reply.".$thistable.".".$this->var['comment_id'].".".$thisid."'>".COMLAN_326."</a>";
if ($thisaction == "comment" && $pref['nested_comments'])
{
$REPLY = "<a id='e-comment-reply-".$this->var['comment_id']."' class='e-comment-reply btn btn-default btn-mini btn-xs' data-type='".$this->var['comment_type']."' data-target='".e_HTTP."comment.php' href='".e_HTTP."comment.php?reply.".$thistable.".".$this->var['comment_id'].".".$thisid."'>".COMLAN_326."</a>";
}
}
}
return $REPLY;