]> git.mxchange.org Git - friendica.git/commitdiff
Fix undefined variables in wall_thread.tpl
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 10 May 2021 22:59:09 +0000 (18:59 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 10 May 2021 22:59:09 +0000 (18:59 -0400)
- Remove unused "num_comments_text" template variable
- Remove unused "item.postops" template variable mention

src/Model/Item.php
src/Object/Post.php
view/theme/vier/templates/wall_thread.tpl

index 64bd266c83fd970351b1d19811a489384c4d49b1..ab99e8c1a1c804994cb4e41ec7e043af00b6eff3 100644 (file)
@@ -3020,7 +3020,7 @@ class Item
                        ];
 
                        if (!empty($item['plink'])) {
-                               $ret["href"] = DI::baseUrl()->remove($item['plink']);
+                               $ret['href'] = DI::baseUrl()->remove($item['plink']);
                                $ret["title"] = DI::l10n()->t('link to source');
                        }
                } elseif (!empty($item['plink']) && ($item['private'] != self::PRIVATE)) {
@@ -3028,6 +3028,7 @@ class Item
                                'href' => $item['plink'],
                                'orig' => $item['plink'],
                                'title' => DI::l10n()->t('link to source'),
+                               'orig_title' => DI::l10n()->t('Link to source'),
                        ];
                } else {
                        $ret = [];
index 6973fd236a3064c92b1fd0102a731a0128566c56..7bd3bcefb3e5f03df5692067ca6aa2410b9ba038 100644 (file)
@@ -427,6 +427,8 @@ class Post
                $tmp_item = [
                        'template'        => $this->getTemplate(),
                        'type'            => implode("", array_slice(explode("/", $item['verb']), -1)),
+                       'comment_firstcollapsed' => false,
+                       'comment_lastcollapsed' => false,
                        'suppress_tags'   => DI::config()->get('system', 'suppress_tags'),
                        'tags'            => $tags['tags'],
                        'hashtags'        => $tags['hashtags'],
@@ -543,10 +545,7 @@ class Post
                        }
                }
 
-               if ($this->isToplevel()) {
-                       $result['total_comments_num'] = "$total_children";
-                       $result['total_comments_text'] = DI::l10n()->tt('comment', 'comments', $total_children);
-               }
+               $result['total_comments_num'] = $this->isToplevel() ? $total_children : 0;
 
                $result['private'] = $item['private'];
                $result['toplevel'] = ($this->isToplevel() ? 'toplevel_item' : '');
index f5e13137a3a0ed195c658ee2180de8f313ff4f0f..36e26b0a521bf0d86cf795dab57bbe064eadfe2e 100644 (file)
                        {{/if}}
                        </div>
 
-                       <div class="wall-item-location">{{$item.location_html nofilter}} {{$item.postopts}}</div>
+                       <div class="wall-item-location">{{$item.location_html nofilter}}</div>
 
                        <div class="wall-item-actions-isevent">
                        </div>