]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge pull request #9254 from annando/show-relay
[friendica.git] / include / conversation.php
index fd7303fa46f4d97090c539ea0df68d6eca2306f4..b25fae4f71683b47317bba6bde90583a5124c613 100644 (file)
@@ -520,10 +520,6 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
 
                                $threadsid++;
 
-                               $owner_url   = '';
-                               $owner_name  = '';
-                               $sparkle     = '';
-
                                // prevent private email from leaking.
                                if ($item['network'] === Protocol::MAIL && local_user() != $item['uid']) {
                                        continue;
@@ -540,6 +536,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'network' => $item['author-network'], 'url' => $item['author-link']];
                                $profile_link = Contact::magicLinkByContact($author);
 
+                               $sparkle = '';
                                if (strpos($profile_link, 'redir/') === 0) {
                                        $sparkle = ' sparkle';
                                }
@@ -562,10 +559,6 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'delete' => DI::l10n()->t('Delete'),
                                ];
 
-                               $star = false;
-                               $isstarred = "unstarred";
-
-                               $lock = false;
                                $likebuttons = [
                                        'like'    => null,
                                        'dislike' => null,
@@ -595,10 +588,10 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'network_icon' => ContactSelector::networkToIcon($item['network'], $item['author-link']),
                                        'linktitle' => DI::l10n()->t('View %s\'s profile @ %s', $profile_name, $item['author-link']),
                                        'profile_url' => $profile_link,
-                                       'item_photo_menu' => item_photo_menu($item),
+                                       'item_photo_menu_html' => item_photo_menu($item),
                                        'name' => $profile_name,
                                        'sparkle' => $sparkle,
-                                       'lock' => $lock,
+                                       'lock' => false,
                                        'thumb' => DI::baseUrl()->remove($item['author-avatar']),
                                        'title' => $title,
                                        'body_html' => $body_html,
@@ -617,18 +610,18 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                        'ago' => (($item['app']) ? DI::l10n()->t('%s from %s', Temporal::getRelativeDate($item['created']),$item['app']) : Temporal::getRelativeDate($item['created'])),
                                        'location_html' => $location_html,
                                        'indent' => '',
-                                       'owner_name' => $owner_name,
-                                       'owner_url' => $owner_url,
+                                       'owner_name' => '',
+                                       'owner_url' => '',
                                        'owner_photo' => DI::baseUrl()->remove($item['owner-avatar']),
                                        'plink' => Item::getPlink($item),
                                        'edpost' => false,
-                                       'isstarred' => $isstarred,
-                                       'star' => $star,
+                                       'isstarred' => 'unstarred',
+                                       'star' => false,
                                        'drop' => $drop,
                                        'vote' => $likebuttons,
-                                       'like' => '',
-                                       'dislike' => '',
-                                       'comment' => '',
+                                       'like_html' => '',
+                                       'dislike_html' => '',
+                                       'comment_html' => '',
                                        'conv' => (($preview) ? '' : ['href'=> 'display/'.$item['guid'], 'title'=> DI::l10n()->t('View in context')]),
                                        'previewing' => $previewing,
                                        'wait' => DI::l10n()->t('Please wait'),
@@ -768,7 +761,16 @@ function conversation_fetch_comments($thread_items, $pinned) {
                        case Item::PT_STORED:
                                $row['direction'] = ['direction' => 8, 'title' => DI::l10n()->t('Stored')];
                                break;
-               }
+                       case Item::PT_GLOBAL:
+                               $row['direction'] = ['direction' => 9, 'title' => DI::l10n()->t('Global')];
+                               break;
+                       case Item::PT_RELAY:
+                               $row['direction'] = ['direction' => 10, 'title' => DI::l10n()->t('Relay')];
+                               break;
+                       case Item::PT_FETCHED:
+                               $row['direction'] = ['direction' => 2, 'title' => DI::l10n()->t('Fetched')];
+                               break;
+                       }
 
                if (($row['gravity'] == GRAVITY_PARENT) && !$row['origin'] && ($row['author-id'] == $row['owner-id']) &&
                        !Contact::isSharing($row['author-id'], $row['uid'])) {