Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
c9b6da0127
commit
c1f9c1aaa5
|
@ -3051,6 +3051,7 @@ class Item
|
||||||
if (Contact\User::isCollapsed($item['author-id'], $item['uid'])) {
|
if (Contact\User::isCollapsed($item['author-id'], $item['uid'])) {
|
||||||
$filter_reasons[] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']);
|
$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))) {
|
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']);
|
$filter_reasons[] = DI::l10n()->t('Content warning: %s', $item['content-warning']);
|
||||||
}
|
}
|
||||||
|
|
|
@ -416,7 +416,7 @@ class Contact extends BaseModule
|
||||||
case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break;
|
case 'blocked': $header .= ' - ' . DI::l10n()->t('Blocked'); break;
|
||||||
case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break;
|
case 'hidden': $header .= ' - ' . DI::l10n()->t('Hidden'); break;
|
||||||
case 'ignored': $header .= ' - ' . DI::l10n()->t('Ignored'); 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;
|
case 'archived': $header .= ' - ' . DI::l10n()->t('Archived'); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -207,7 +207,7 @@ class Profile extends BaseModule
|
||||||
// @TODO Backward compatibility, replace with $localRelationship->unblock()
|
// @TODO Backward compatibility, replace with $localRelationship->unblock()
|
||||||
Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), false);
|
Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), false);
|
||||||
|
|
||||||
$message = $this->t('Contact has been collapsed');
|
$message = $this->t('Contact has been uncollapsed');
|
||||||
} else {
|
} else {
|
||||||
// @TODO Backward compatibility, replace with $localRelationship->block()
|
// @TODO Backward compatibility, replace with $localRelationship->block()
|
||||||
Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), true);
|
Contact\User::setCollapsed($contact['id'], DI::userSession()->getLocalUserId(), true);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user