From 8d5eb61ea3dd61433cc6f1d2b9000d47340f8342 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 13 Sep 2020 19:43:42 -0400 Subject: [PATCH] Normalize item comment template variable name --- include/conversation.php | 2 +- src/Object/Post.php | 4 ++-- view/templates/wall_thread.tpl | 6 +++--- view/theme/frio/templates/search_item.tpl | 8 ++++---- view/theme/frio/templates/wall_thread.tpl | 16 ++++++++-------- view/theme/quattro/templates/wall_item_tag.tpl | 6 +++--- view/theme/quattro/templates/wall_thread.tpl | 10 +++++----- view/theme/smoothly/templates/wall_thread.tpl | 6 +++--- view/theme/vier/templates/wall_item_tag.tpl | 6 +++--- view/theme/vier/templates/wall_thread.tpl | 18 +++++++++--------- 10 files changed, 41 insertions(+), 41 deletions(-) diff --git a/include/conversation.php b/include/conversation.php index 8b658521e..0c007851c 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -628,7 +628,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o 'vote' => $likebuttons, 'like' => '', 'dislike' => '', - 'comment' => '', + 'comment_html' => '', 'conv' => (($preview) ? '' : ['href'=> 'display/'.$item['guid'], 'title'=> DI::l10n()->t('View in context')]), 'previewing' => $previewing, 'wait' => DI::l10n()->t('Please wait'), diff --git a/src/Object/Post.php b/src/Object/Post.php index 6e5088f16..70142e887 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -349,7 +349,7 @@ class Post } } - $comment = $this->getCommentBox($indent); + $comment_html = $this->getCommentBox($indent); if (strcmp(DateTimeFormat::utc($item['created']), DateTimeFormat::utc('now - 12 hours')) > 0) { $shiny = 'shiny'; @@ -479,7 +479,7 @@ class Post 'responses' => $responses, 'switchcomment' => DI::l10n()->t('Comment'), 'reply_label' => DI::l10n()->t('Reply to %s', $name_e), - 'comment' => $comment, + 'comment_html' => $comment_html, 'remote_comment' => $remote_comment, 'menu' => DI::l10n()->t('More'), 'previewing' => $conv->isPreview() ? ' preview ' : '', diff --git a/view/templates/wall_thread.tpl b/view/templates/wall_thread.tpl index 235889930..73e99cb1b 100644 --- a/view/templates/wall_thread.tpl +++ b/view/templates/wall_thread.tpl @@ -129,9 +129,9 @@ {{/foreach}} {{/if}} {{if $item.threaded}} - {{if $item.comment}} + {{if $item.comment_html}}
- {{$item.comment nofilter}} + {{$item.comment_html nofilter}}
{{/if}} {{/if}} @@ -144,7 +144,7 @@ {{if $item.flatten}}
- {{$item.comment nofilter}} + {{$item.comment_html nofilter}}
{{/if}} diff --git a/view/theme/frio/templates/search_item.tpl b/view/theme/frio/templates/search_item.tpl index bb01b48dd..d7a22927c 100644 --- a/view/theme/frio/templates/search_item.tpl +++ b/view/theme/frio/templates/search_item.tpl @@ -128,7 +128,7 @@

{{* Action buttons to interact with the item (like: like, dislike, share and so on *}} - diff --git a/view/theme/quattro/templates/wall_item_tag.tpl b/view/theme/quattro/templates/wall_item_tag.tpl index 93e6abaef..71c7e0844 100644 --- a/view/theme/quattro/templates/wall_item_tag.tpl +++ b/view/theme/quattro/templates/wall_item_tag.tpl @@ -58,10 +58,10 @@ {{/if}} {{* top thread comment box *}} -{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} -

{{$item.comment nofilter}}
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}} +
{{$item.comment_html nofilter}}
{{/if}}{{/if}}{{/if}} {{if $item.flatten}} -
{{$item.comment nofilter}}
+
{{$item.comment_html nofilter}}
{{/if}} diff --git a/view/theme/quattro/templates/wall_thread.tpl b/view/theme/quattro/templates/wall_thread.tpl index 6c557507b..a97a0cc5e 100644 --- a/view/theme/quattro/templates/wall_thread.tpl +++ b/view/theme/quattro/templates/wall_thread.tpl @@ -161,11 +161,11 @@ {{/if}} - {{if $item.threaded}}{{if $item.comment}}{{if $item.indent==comment}} + {{if $item.threaded}}{{if $item.comment_html}}{{if $item.indent==comment}}
- {{$item.comment nofilter}} + {{$item.comment_html nofilter}}
{{/if}}{{/if}}{{/if}} @@ -189,11 +189,11 @@ {{/if}} {{* top thread comment box *}} -{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} -
{{$item.comment nofilter}}
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}} +
{{$item.comment_html nofilter}}
{{/if}}{{/if}}{{/if}} {{if $item.flatten}} -
{{$item.comment nofilter}}
+
{{$item.comment_html nofilter}}
{{/if}} diff --git a/view/theme/smoothly/templates/wall_thread.tpl b/view/theme/smoothly/templates/wall_thread.tpl index d5138978d..0cd52fcde 100644 --- a/view/theme/smoothly/templates/wall_thread.tpl +++ b/view/theme/smoothly/templates/wall_thread.tpl @@ -147,9 +147,9 @@
{{$item.dislike nofilter}}
{{if $item.threaded}} - {{if $item.comment}} + {{if $item.comment_html}}
- {{$item.comment nofilter}} + {{$item.comment_html nofilter}}
{{/if}} {{/if}} @@ -163,7 +163,7 @@ {{if $item.flatten}}
- {{$item.comment nofilter}} + {{$item.comment_html nofilter}}
{{/if}} diff --git a/view/theme/vier/templates/wall_item_tag.tpl b/view/theme/vier/templates/wall_item_tag.tpl index 960cb171a..76e587f00 100644 --- a/view/theme/vier/templates/wall_item_tag.tpl +++ b/view/theme/vier/templates/wall_item_tag.tpl @@ -58,10 +58,10 @@ {{/if}} {{* top thread comment box *}} -{{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} -
{{$item.comment nofilter}}
+{{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}} +
{{$item.comment_html nofilter}}
{{/if}}{{/if}}{{/if}} {{if $item.flatten}} -
{{$item.comment nofilter}}
+
{{$item.comment_html nofilter}}
{{/if}} diff --git a/view/theme/vier/templates/wall_thread.tpl b/view/theme/vier/templates/wall_thread.tpl index aedcf34e4..944aee77b 100644 --- a/view/theme/vier/templates/wall_thread.tpl +++ b/view/theme/vier/templates/wall_thread.tpl @@ -109,7 +109,7 @@ {{$item.remote_comment.1}} {{/if}} - {{if $item.comment}} + {{if $item.comment_html}} {{$item.switchcomment}} {{/if}} @@ -181,12 +181,12 @@ - {{if $item.threaded}}{{if $item.comment}} + {{if $item.threaded}}{{if $item.comment_html}}
{{/if}}{{/if}} @@ -210,19 +210,19 @@ {{/if}} {{if $item.total_comments_num}} - {{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} -
{{$item.comment nofilter}}
+ {{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}} +
{{$item.comment_html nofilter}}
{{/if}}{{/if}}{{/if}} {{if $item.flatten}} -
{{$item.comment nofilter}}
+
{{$item.comment_html nofilter}}
{{/if}} {{else}} - {{if $item.threaded}}{{if $item.comment}}{{if $item.thread_level==1}} - + {{if $item.threaded}}{{if $item.comment_html}}{{if $item.thread_level==1}} + {{/if}}{{/if}}{{/if}} {{if $item.flatten}} - + {{/if}} {{/if}}