Merge pull request #11367 from annando/title-cq

Prioritize the title over the summary (content warning)
This commit is contained in:
Hypolite Petovan 2022-03-22 08:53:48 -04:00 committed by GitHub
commit 56d0a33286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -631,10 +631,12 @@ class Conversation
[$categories, $folders] = $this->item->determineCategoriesTerms($item, local_user());
if (!empty($item['content-warning']) && $this->pConfig->get(local_user(), 'system', 'disable_cw', false)) {
if (!empty($item['title'])) {
$title = $item['title'];
} elseif (!empty($item['content-warning']) && $this->pConfig->get(local_user(), 'system', 'disable_cw', false)) {
$title = ucfirst($item['content-warning']);
} else {
$title = $item['title'];
$title = '';
}
$tmp_item = [

View File

@ -389,10 +389,12 @@ class Post
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item, local_user());
if (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
if (!empty($item['title'])) {
$title = $item['title'];
} elseif (!empty($item['content-warning']) && DI::pConfig()->get(local_user(), 'system', 'disable_cw', false)) {
$title = ucfirst($item['content-warning']);
} else {
$title = $item['title'];
$title = '';
}
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {