]> git.mxchange.org Git - friendica.git/blobdiff - include/conversation.php
Merge remote-tracking branch 'upstream/2021.06-rc' into forum-handling
[friendica.git] / include / conversation.php
index eae7fd72749bd8bf6b9f7e49e02991da34b142fa..c0383bd88fa3f07e4abf27dc012d178e5fa790f2 100644 (file)
@@ -737,8 +737,6 @@ function conversation_fetch_comments($thread_items, bool $pinned, array $activit
                        }
                }
 
-               $name = $row['causer-contact-type'] == Contact::TYPE_RELAY ? $row['causer-link'] : $row['causer-name'];
-
                switch ($row['post-reason']) {
                        case Item::PR_TO:
                                $row['direction'] = ['direction' => 7, 'title' => DI::l10n()->t('You had been addressed (%s).', 'to')];
@@ -769,9 +767,9 @@ function conversation_fetch_comments($thread_items, bool $pinned, array $activit
                                if (($row['gravity'] == GRAVITY_PARENT) && !empty($row['causer-id'])) {
                                        $causer = ['uid' => 0, 'id' => $row['causer-id'],
                                                'network' => $row['causer-network'], 'url' => $row['causer-link']];
-                                       $row['reshared'] = DI::l10n()->t('%s reshared this.', '<a href="'. htmlentities(Contact::magicLinkByContact($causer)) .'">' . htmlentities($name) . '</a>');
+                                       $row['reshared'] = DI::l10n()->t('%s reshared this.', '<a href="'. htmlentities(Contact::magicLinkByContact($causer)) .'">' . htmlentities($row['causer-name']) . '</a>');
                                }
-                               $row['direction'] = ['direction' => 3, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Reshared') : DI::l10n()->t('Reshared by %s', $name))];
+                               $row['direction'] = ['direction' => 3, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Reshared') : DI::l10n()->t('Reshared by %s <%s>', $row['causer-name'], $row['causer-link']))];
                                break;
                        case Item::PR_COMMENT:
                                $row['direction'] = ['direction' => 5, 'title' => DI::l10n()->t('%s is participating in this thread.', $row['author-name'])];
@@ -783,10 +781,10 @@ function conversation_fetch_comments($thread_items, bool $pinned, array $activit
                                $row['direction'] = ['direction' => 9, 'title' => DI::l10n()->t('Global')];
                                break;
                        case Item::PR_RELAY:
-                               $row['direction'] = ['direction' => 10, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Relayed') : DI::l10n()->t('Relayed by %s.', $name))];
+                               $row['direction'] = ['direction' => 10, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Relayed') : DI::l10n()->t('Relayed by %s <%s>', $row['causer-name'], $row['causer-link']))];
                                break;
                        case Item::PR_FETCHED:
-                               $row['direction'] = ['direction' => 2, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Fetched') : DI::l10n()->t('Fetched because of %s', $name))];
+                               $row['direction'] = ['direction' => 2, 'title' => (empty($row['causer-id']) ? DI::l10n()->t('Fetched') : DI::l10n()->t('Fetched because of %s <%s>', $row['causer-name'], $row['causer-link']))];
                                break;
                        }
 
@@ -888,7 +886,8 @@ function conversation_fetch_items(array $parent, array $items, array $condition,
        return $items;
 }
 
-function item_photo_menu($item) {
+function item_photo_menu($item)
+{
        $sub_link = '';
        $poke_link = '';
        $contact_url = '';
@@ -929,8 +928,8 @@ function item_photo_menu($item) {
        if (!empty($pcid)) {
                $contact_url = 'contact/' . $pcid;
                $posts_link  = $contact_url . '/posts';
-               $block_link  = $contact_url . '/block';
-               $ignore_link = $contact_url . '/ignore';
+               $block_link  = $item['self'] ? '' : $contact_url . '/block';
+               $ignore_link = $item['self'] ? '' : $contact_url . '/ignore';
        }
 
        if ($cid && !$item['self']) {
@@ -983,7 +982,7 @@ function item_photo_menu($item) {
                if (strpos($v, 'javascript:') === 0) {
                        $v = substr($v, 11);
                        $o .= '<li role="menuitem"><a onclick="' . $v . '">' . $k . '</a></li>' . PHP_EOL;
-               } elseif ($v!='') {
+               } elseif ($v) {
                        $o .= '<li role="menuitem"><a href="' . $v . '">' . $k . '</a></li>' . PHP_EOL;
                }
        }
@@ -1211,6 +1210,7 @@ function status_editor(App $a, $x, $notes_cid = 0, $popup = false)
                '$edimg'        => DI::l10n()->t('Image'),
                '$edurl'        => DI::l10n()->t('Link'),
                '$edattach'     => DI::l10n()->t('Link or Media'),
+               '$edvideo'      => DI::l10n()->t('Video'),
                '$setloc'       => DI::l10n()->t('Set your location'),
                '$shortsetloc'  => DI::l10n()->t('set location'),
                '$noloc'        => DI::l10n()->t('Clear browser location'),