]> git.mxchange.org Git - friendica.git/commitdiff
Normalize item body template variable name
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 13 Sep 2020 23:37:43 +0000 (19:37 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 14 Sep 2020 00:01:53 +0000 (20:01 -0400)
14 files changed:
include/conversation.php
src/Object/Post.php
view/templates/search_item.tpl
view/templates/wall_thread.tpl
view/theme/frio/templates/search_item.tpl
view/theme/frio/templates/wall_thread.tpl
view/theme/quattro/templates/search_item.tpl
view/theme/quattro/templates/wall_item_tag.tpl
view/theme/quattro/templates/wall_thread.tpl
view/theme/smoothly/templates/search_item.tpl
view/theme/smoothly/templates/wall_thread.tpl
view/theme/vier/templates/search_item.tpl
view/theme/vier/templates/wall_item_tag.tpl
view/theme/vier/templates/wall_thread.tpl

index 6bf511a6bce29b7b484b7b8783b11f52cafb6684..fd7303fa46f4d97090c539ea0df68d6eca2306f4 100644 (file)
@@ -576,7 +576,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        unset($likebuttons['dislike']);
                                }
 
-                               $body = Item::prepareBody($item, true, $preview);
+                               $body_html = Item::prepareBody($item, true, $preview);
 
                                list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
 
@@ -601,7 +601,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'lock' => $lock,
                                        'thumb' => DI::baseUrl()->remove($item['author-avatar']),
                                        'title' => $title,
-                                       'body' => $body,
+                                       'body_html' => $body_html,
                                        'tags' => $tags['tags'],
                                        'hashtags' => $tags['hashtags'],
                                        'mentions' => $tags['mentions'],
@@ -612,7 +612,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'has_folders' => ((count($folders)) ? 'true' : ''),
                                        'categories' => $categories,
                                        'folders' => $folders,
-                                       'text' => strip_tags($body),
+                                       'text' => strip_tags($body_html),
                                        'localtime' => DateTimeFormat::local($item['created'], 'r'),
                                        'ago' => (($item['app']) ? DI::l10n()->t('%s from %s', Temporal::getRelativeDate($item['created']),$item['app']) : Temporal::getRelativeDate($item['created'])),
                                        'location_html' => $location_html,
index f5e91c07c587b536a95c58460dfdf846a1323343..81762330924683bdcf003c72a22decf29c0c6c6c 100644 (file)
@@ -357,13 +357,12 @@ class Post
 
                localize_item($item);
 
-               $body = Item::prepareBody($item, true);
+               $body_html = Item::prepareBody($item, true);
 
                list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);
 
-               $body_e       = $body;
-               $text_e       = strip_tags($body);
                $name_e       = $profile_name;
+               $text       = strip_tags($body_html);
 
                if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
                        $title_e = ucfirst($item['content-warning']);
@@ -432,8 +431,8 @@ class Post
                        'has_folders'     => ((count($folders)) ? 'true' : ''),
                        'categories'      => $categories,
                        'folders'         => $folders,
-                       'body'            => $body_e,
-                       'text'            => $text_e,
+                       'body_html'       => $body_html,
+                       'text'            => $text,
                        'id'              => $this->getId(),
                        'guid'            => urlencode($item['guid']),
                        'isevent'         => $isevent,
index 82db4884c648f3013f11727bb9358e8a56baba7b..32d1823ca5cf42805dc311305c3ef9c382b9beec 100644 (file)
@@ -30,7 +30,7 @@
                <div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
                        <div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
                        <div class="wall-item-title-end"></div>
-                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body nofilter}}</div>
+                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body_html nofilter}}</div>
                        {{if $item.has_cats}}
                        <div class="categorytags"><span>{{$item.txt_cats}} {{foreach $item.categories as $cat}}{{$cat.name}}{{if $cat.removeurl}} <a href="{{$cat.removeurl}}" title="{{$remove}}">[{{$remove}}]</a>{{/if}} {{if $cat.last}}{{else}}, {{/if}}{{/foreach}}
                        </div>
index 13b358b52033aab3775131cce73f415d9e826ae3..c805a2921e335854adba0479a5753bf310fcea93 100644 (file)
@@ -58,7 +58,7 @@
                <div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
                        <div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
                        <div class="wall-item-title-end"></div>
-                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body nofilter}}<span>
+                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body_html nofilter}}<span>
                        <div class="body-tag">
                        {{if !$item.suppress_tags}}
                                {{foreach $item.tags as $tag}}
index e48a12b50b0997f9b28b06d8118548c6b730cf6c..bb01b48ddbd0e928640b04f784c29bf9fd162bf7 100644 (file)
@@ -96,7 +96,7 @@
                                <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}}">{{$item.title}}</a></h4><br /></span>
                                {{/if}}
 
-                               <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body nofilter}}</div>
+                               <div class="wall-item-body" id="wall-item-body-{{$item.id}}">{{$item.body_html nofilter}}</div>
                        </div>
 
                        <!-- TODO -->
index 2b285456a9b09c7f2185e6e1e5915a40b5db6672..03a1889e2f7bb14d324b0c1c788cf518a88743d7 100644 (file)
@@ -246,7 +246,7 @@ as the value of $top_child_total (this is done at the end of this file)
                        <span class="wall-item-title" id="wall-item-title-{{$item.id}}"><h4 class="media-heading"><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h4><br /></span>
                        {{/if}}
 
-                       <div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body nofilter}}</div>
+                       <div class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}" id="wall-item-body-{{$item.id}}">{{$item.body_html nofilter}}</div>
                </div>
 
                <!-- TODO -->
index be9a43604a186810d03d3006c4097880360b2ff1..dcbe827909f807715166b18303f35b0478891025 100644 (file)
@@ -23,7 +23,7 @@
                </div>
                <div class="wall-item-content">
                        {{if $item.title}}<h2><a href="{{$item.plink.href}}">{{$item.title}}</a></h2>{{/if}}
-                       <div class="wall-item-body">{{$item.body nofilter}}</div>
+                       <div class="wall-item-body">{{$item.body_html nofilter}}</div>
                </div>
        </div>
        <div class="wall-item-bottom">
index e957e719a6f2944c7de16f407499ae3ad7891004..4e0c230cb0827f3bcc2625447aa17ac9b22d0ece 100644 (file)
@@ -37,7 +37,7 @@
                        <div class="wall-item-location">{{$item.location_html nofilter}}</div>
                </div>
                <div class="wall-item-content">
-                       {{$item.ago}} {{$item.body nofilter}}
+                       {{$item.ago}} {{$item.body_html nofilter}}
                </div>
                        <div class="wall-item-tools">
                                {{if $item.drop.pagedrop}}
index 7c8a567835414fd38b684a465e3edc3658591693..612e646f04595eadf87fbf36d81f4030d0ee602d 100644 (file)
@@ -54,7 +54,7 @@
                </div>
                <div class="wall-item-content">
                        {{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
-                       <span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body nofilter}}</span>
+                       <span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</span>
                </div>
        </div>
        <div class="wall-item-bottom">
index 284264f29b922dfb2dcf6b5cd6f8a43e3e6dd83b..1e5b5c58018ba25eeedb22193b87307f06b82951 100644 (file)
@@ -31,7 +31,7 @@
                <div class="wall-item-content" id="wall-item-content-{{$item.id}}" >
                        <div class="wall-item-title" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
                        <div class="wall-item-title-end"></div>
-                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body nofilter}}</div>
+                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" >{{$item.body_html nofilter}}</div>
                </div>
                <div class="wall-item-author">
                                <a href="{{$item.profile_url}}" title="{{$item.linktitle}}" class="wall-item-name-link"><span class="wall-item-name{{$item.sparkle}}" id="wall-item-name-{{$item.id}}" >{{$item.name}}</span></a>
index 99d70205393e2d42c4dc824aa1e07a8b772f72e1..198b7850199b46a0ac3d98887cc4b4319e456bdc 100644 (file)
@@ -62,7 +62,7 @@
                </div>
                        <div class="wall-item-title p-name" id="wall-item-title-{{$item.id}}">{{$item.title}}</div>
                        <div class="wall-item-title-end"></div>
-                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body nofilter}}</span>
+                       <div class="wall-item-body" id="wall-item-body-{{$item.id}}" ><span class="e-content">{{$item.body_html nofilter}}</span>
                                <div class="body-tag">
                                {{if !$item.suppress_tags}}
                                        {{foreach $item.tags as $tag}}
index 1ab47844cc9a39b8ebbe60a8d208024fd6b2a32e..b21b3de9fd11224dce931d36f47bf254454b68ee 100644 (file)
@@ -30,7 +30,7 @@
                </div>
                <div class="wall-item-content">
                        {{if $item.title}}<h2><a href="{{$item.plink.href}}">{{$item.title}}</a></h2>{{/if}}
-                       <div class="wall-item-body">{{$item.body nofilter}}</div>
+                       <div class="wall-item-body">{{$item.body_html nofilter}}</div>
                </div>
        </div>
        <div class="wall-item-bottom">
index eedc51bf17c4a7b2012ea9dfd3108141f48a7be2..f52da7c8d58d3803b41d20b3467b63869e085fea 100644 (file)
@@ -37,7 +37,7 @@
                        <div class="wall-item-location">{{$item.location_html nofilter}}</div>
                </div>
                <div class="wall-item-content">
-                       {{$item.ago}} {{$item.body nofilter}}
+                       {{$item.ago}} {{$item.body_html nofilter}}
                </div>
                        <div class="wall-item-tools">
                                {{if $item.drop.pagedrop}}
index 60f0c796cba8a046c82a05a3e0aebf89faa770ae..29d6840c7af5a2e5db65c79dd124051ea5f8703b 100644 (file)
@@ -74,7 +74,7 @@
 
                <div itemprop="description" class="wall-item-content">
                        {{if $item.title}}<h2><a href="{{$item.plink.href}}" class="{{$item.sparkle}} p-name">{{$item.title}}</a></h2>{{/if}}
-                       <span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body nofilter}}</span>
+                       <span class="wall-item-body e-content {{if !$item.title}}p-name{{/if}}">{{$item.body_html nofilter}}</span>
                </div>
        </div>
        <div class="wall-item-bottom">