From: Michael Vogel Date: Sun, 8 Jan 2023 22:13:31 +0000 (+0100) Subject: Apply suggestions from code review X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c1f9c1aaa5ab7c273f2947b5419538aa03c44938;p=friendica.git Apply suggestions from code review Co-authored-by: Hypolite Petovan --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 8b1002fb26..afa51461e8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3051,6 +3051,7 @@ class Item if (Contact\User::isCollapsed($item['author-id'], $item['uid'])) { $filter_reasons[] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']); } + if (!empty($item['content-warning']) && (!DI::userSession()->getLocalUserId() || !DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'system', 'disable_cw', false))) { $filter_reasons[] = DI::l10n()->t('Content warning: %s', $item['content-warning']); } diff --git a/src/Module/Contact.php b/src/Module/Contact.php index 7441e52bcd..21b1793af5 100644 --- a/src/Module/Contact.php +++ b/src/Module/Contact.php @@ -416,7 +416,7 @@ class Contact extends BaseModule case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break; case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break; case 'ignored': $header .= ' - ' . DI::l10n()->t('Ignored'); break; - case 'collapsed': $header .= ' - ' . DI::l10n()->t('collapsed'); break; + case 'collapsed': $header .= ' - ' . DI::l10n()->t('Collapsed'); break; case 'archived': $header .= ' - ' . DI::l10n()->t('Archived'); break; } diff --git a/src/Module/Contact/Profile.php b/src/Module/Contact/Profile.php index 886798a5f8..15eebd3603 100644 --- a/src/Module/Contact/Profile.php +++ b/src/Module/Contact/Profile.php @@ -207,7 +207,7 @@ class Profile extends BaseModule // @TODO Backward compatibility, replace with $localRelationship->unblock() Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), false); - $message = $this->t('Contact has been collapsed'); + $message = $this->t('Contact has been uncollapsed'); } else { // @TODO Backward compatibility, replace with $localRelationship->block() Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), true);