X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FPost.php;h=0a05429dfda19e7f02c8f7c4021f69a40356198b;hb=637b6f5a170ee793160ea05ea2ae629154cb4652;hp=dfe5aba383a3621b45871f8726b88df331d61f36;hpb=4faf08c0643d3e6bbe2a0a77be2ff8c1dbea4d5c;p=friendica.git diff --git a/src/Object/Post.php b/src/Object/Post.php index dfe5aba383..0a05429dfd 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -191,7 +191,7 @@ class Post $pinned = ''; $pin = false; $star = false; - $ignore = false; + $ignore_thread = false; $ispinned = 'unpinned'; $isstarred = 'unstarred'; $indent = ''; @@ -246,8 +246,9 @@ class Post // Showing the one or the other text, depending upon if we can only hide it or really delete it. $delete = $origin ? DI::l10n()->t('Delete globally') : DI::l10n()->t('Remove locally'); - $drop = false; - $block = false; + $drop = false; + $block = false; + $ignore = false; if (DI::userSession()->getLocalUserId()) { $drop = [ 'dropping' => $dropping, @@ -259,9 +260,14 @@ class Post if (!$item['self'] && DI::userSession()->getLocalUserId()) { $block = [ - 'blocking' => true, - 'block' => DI::l10n()->t('Block %s', $item['author-name']), - 'author_id' => $item['author-id'], + 'blocking' => true, + 'block' => DI::l10n()->t('Block %s', $item['author-name']), + 'author_id' => $item['author-id'], + ]; + $ignore = [ + 'ignoring' => true, + 'ignore' => DI::l10n()->t('Ignore %s', $item['author-name']), + 'author_id' => $item['author-id'], ]; } @@ -327,14 +333,14 @@ class Post if ($this->isToplevel()) { if (DI::userSession()->getLocalUserId()) { - $ignored = PostModel\ThreadUser::getIgnored($item['uri-id'], DI::userSession()->getLocalUserId()); - if ($item['mention'] || $ignored) { - $ignore = [ + $ignored_thread = PostModel\ThreadUser::getIgnored($item['uri-id'], DI::userSession()->getLocalUserId()); + if ($item['mention'] || $ignored_thread) { + $ignore_thread = [ 'do' => DI::l10n()->t('Ignore thread'), 'undo' => DI::l10n()->t('Unignore thread'), 'toggle' => DI::l10n()->t('Toggle ignore status'), - 'classdo' => $ignored ? 'hidden' : '', - 'classundo' => $ignored ? '' : 'hidden', + 'classdo' => $ignored_thread ? 'hidden' : '', + 'classundo' => $ignored_thread ? '' : 'hidden', 'ignored' => DI::l10n()->t('Ignored'), ]; } @@ -518,12 +524,13 @@ class Post 'pinned' => $pinned, 'isstarred' => $isstarred, 'star' => $star, - 'ignore' => $ignore, + 'ignore' => $ignore_thread, 'tagger' => $tagger, 'filer' => $filer, 'language' => $languages, 'drop' => $drop, 'block' => $block, + 'ignore_author' => $ignore, 'vote' => $buttons, 'like_html' => $responses['like']['output'], 'dislike_html' => $responses['dislike']['output'],