User hide_dislike user setting to hide dislike button and conversation responses

This commit is contained in:
Hypolite Petovan 2020-02-19 22:20:26 -05:00
parent 96ba2ac00d
commit 637e38e535
7 changed files with 34 additions and 12 deletions

View file

@ -587,6 +587,10 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
'announce' => ['title' => DI::l10n()->t('Reshares','title')]
];
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
unset($conv_responses['dislike']);
}
// array with html for each thread (parent+comments)
$threads = [];
$threadsid = -1;
@ -678,6 +682,10 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
'share' => null,
];
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
unset($likebuttons['dislike']);
}
$body = Item::prepareBody($item, true, $preview);
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item);