mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Исправлена подгрузка комментариев
This commit is contained in:
parent
137e7673e3
commit
2336c10dc5
|
@ -1341,10 +1341,10 @@ class ActionBlog extends Action
|
|||
$oViewerLocal = $this->Viewer_GetLocalViewer();
|
||||
|
||||
$oViewerLocal->Assign('oUserCurrent', $this->oUserCurrent);
|
||||
$oViewerLocal->Assign('bOneComment', true, true);
|
||||
$oViewerLocal->Assign('bShowFavourite', true, true);
|
||||
$oViewerLocal->Assign('bShowVote', true, true);
|
||||
$oViewerLocal->Assign('oComment', $oComment, true);
|
||||
$oViewerLocal->Assign('oneComment', true, true);
|
||||
$oViewerLocal->Assign('useFavourite', true, true);
|
||||
$oViewerLocal->Assign('useVote', true, true);
|
||||
$oViewerLocal->Assign('comment', $oComment, true);
|
||||
|
||||
$sHtml = $oViewerLocal->Fetch($this->Comment_GetTemplateCommentByTarget($oTopic->getId(), 'topic'));
|
||||
|
||||
|
|
|
@ -717,20 +717,20 @@ class ModuleComment extends Module
|
|||
$aCmts = $this->GetCommentsAdditionalData($aComments);
|
||||
$oViewerLocal = $this->Viewer_GetLocalViewer();
|
||||
$oViewerLocal->Assign('oUserCurrent', $this->User_GetUserCurrent());
|
||||
$oViewerLocal->Assign('bOneComment', true);
|
||||
$oViewerLocal->Assign('oneComment', true, true);
|
||||
if ($sTargetType != 'topic') {
|
||||
$oViewerLocal->Assign('bNoCommentFavourites', true);
|
||||
} elseif ($sTargetType == 'topic') {
|
||||
$oViewerLocal->Assign('bShowFavourite', true, true);
|
||||
$oViewerLocal->Assign('bShowVote', true, true);
|
||||
$oViewerLocal->Assign('bShowScroll', true, true);
|
||||
$oViewerLocal->Assign('bShowEdit', true, true);
|
||||
$oViewerLocal->Assign('sDateReadLast', '1', true);
|
||||
$oViewerLocal->Assign('useFavourite', true, true);
|
||||
$oViewerLocal->Assign('useVote', true, true);
|
||||
$oViewerLocal->Assign('useScroll', true, true);
|
||||
$oViewerLocal->Assign('useEdit', true, true);
|
||||
$oViewerLocal->Assign('dateReadLast', '1', true);
|
||||
}
|
||||
$aCmt = array();
|
||||
foreach ($aCmts as $oComment) {
|
||||
$oViewerLocal->Assign('oComment', $oComment, true);
|
||||
$oViewerLocal->Assign('bIsHidden', $oComment->getDelete(), true);
|
||||
$oViewerLocal->Assign('comment', $oComment, true);
|
||||
$oViewerLocal->Assign('isDeleted', $oComment->getDelete(), true);
|
||||
$sText = $oViewerLocal->Fetch($this->GetTemplateCommentByTarget($sId, $sTargetType));
|
||||
$aCmt[] = array(
|
||||
'html' => $sText,
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
{block 'comment-form-fields'}
|
||||
{* Скрытые поля *}
|
||||
{include 'components/field/field.hidden.tpl' name='reply' value='0' classes='js-comment-form-id'}
|
||||
{include 'components/field/field.hidden.tpl' name='reply' value='0' inputClasses='js-comment-form-id'}
|
||||
{include 'components/field/field.hidden.tpl' name='cmt_target_id' value=$targetId}
|
||||
|
||||
{* Текст комментария *}
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
</li>
|
||||
|
||||
{* Прокрутка к родительскому комментарию *}
|
||||
{if $smarty.local.useScroll}
|
||||
{if $smarty.local.useScroll|default:true}
|
||||
{if $comment->getPid()}
|
||||
<li class = "{$component}-scroll-to {$component}-scroll-to-parent js-comment-scroll-to-parent"
|
||||
title = "{$aLang.comments.comment.scroll_to_parent}"
|
||||
|
|
Loading…
Reference in a new issue