diff --git a/e107_handlers/comment_class.php b/e107_handlers/comment_class.php index bd5bd8dbf..0d8568e5a 100644 --- a/e107_handlers/comment_class.php +++ b/e107_handlers/comment_class.php @@ -932,22 +932,29 @@ class comment 'subject' => $subject, 'rate' => $rate ); + $text = $lock = $modcomment =''; - $tmp = $this->getComments($table,$id,0,$options); // render all comments; - $text = $tmp['comments']; - $lock = $tmp['lock']; - + if($action != 'reply') + { + $tmp = $this->getComments($table,$id,0,$options); // render all comments; + $text = $tmp['comments']; + $lock = $tmp['lock']; + unset($tmp); + } // ------------------------------------------------------- - if($this->totalComments && getperms("B")) + if($text) { - $modcomment = "
"; - // $modcomment .= "".COMLAN_314.""; - $modcomment .= "".COMLAN_314.""; - $modcomment .= "
"; - } - - $modcomment .= $this->nextprev($table,$id,$from); + if($this->totalComments && getperms("B")) + { + $modcomment = "
"; + // $modcomment .= "".COMLAN_314.""; + $modcomment .= "".COMLAN_314.""; + $modcomment .= "
"; + } + + $modcomment .= $this->nextprev($table,$id,$from); + } // --------------------------- if ($lock != '1') @@ -958,14 +965,14 @@ class comment { $comment = "
".COMLAN_328."
"; } - + + if($text) + { + $text = "
\n".$text."\n
"; + } $search = array("{MODERATE}","{COMMENTS}","{COMMENTFORM}","{COMMENTNAV}"); - $replace = array($modcomment,"
\n".$text."\n
",$comment,$pagination); + $replace = array($modcomment,$text,$comment,$pagination); $TEMPL = str_replace($search,$replace,$this->template['LAYOUT']); - - - - if(!$return) { @@ -985,8 +992,8 @@ class comment - $ret['comment'] = "
\n".$text."\n
"; - + $ret['comment'] = $text; + $ret['comment_form'] = $comment; $ret['caption'] = "".$this->totalComments." ".COMLAN_99;