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

Fixes #3455 - Check page comments flag before rendering comments

This commit is contained in:
Tijn Kuyper
2019-02-04 17:32:22 +01:00
parent 0192d9f481
commit 54dc15703b

View File

@@ -161,11 +161,15 @@ class cpage_shortcodes extends e_shortcode
// Not a shortcode really, as it shouldn't be cached at all :/ // Not a shortcode really, as it shouldn't be cached at all :/
function cpagecomments() function cpagecomments()
{ {
$com = $this->var['comments']; $com = $this->var['comments'];
$comflag = $this->var['page_comment_flag'];
//if($parm && isset($com[$parm])) return $com[$parm]; //if($parm && isset($com[$parm])) return $com[$parm];
if($comflag)
return e107::getComment()->parseLayout($com['comment'],$com['comment_form'],$com['moderate']); {
return e107::getComment()->parseLayout($com['comment'],$com['comment_form'],$com['moderate']);
}
// return $com['comment'].$com['moderate'].$com['comment_form']; // return $com['comment'].$com['moderate'].$com['comment_form'];
} }