Prioritize the title over the content warning

This commit is contained in:
Michael 2022-03-22 07:00:44 +00:00
parent a2a5f05a19
commit be016b0c45
2 changed files with 6 additions and 6 deletions

View File

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

View File

@ -389,10 +389,10 @@ 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)) {
$title = ucfirst($item['content-warning']);
} else {
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']);
}
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {