Merge pull request #11367 from annando/title-cq
Prioritize the title over the summary (content warning)
This commit is contained in:
commit
56d0a33286
2 changed files with 8 additions and 4 deletions
|
@ -631,10 +631,12 @@ class Conversation
|
||||||
|
|
||||||
[$categories, $folders] = $this->item->determineCategoriesTerms($item, local_user());
|
[$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']);
|
$title = ucfirst($item['content-warning']);
|
||||||
} else {
|
} else {
|
||||||
$title = $item['title'];
|
$title = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$tmp_item = [
|
$tmp_item = [
|
||||||
|
|
|
@ -389,10 +389,12 @@ class Post
|
||||||
|
|
||||||
list($categories, $folders) = DI::contentItem()->determineCategoriesTerms($item, local_user());
|
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']);
|
$title = ucfirst($item['content-warning']);
|
||||||
} else {
|
} else {
|
||||||
$title = $item['title'];
|
$title = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
|
if (DI::pConfig()->get(local_user(), 'system', 'hide_dislike')) {
|
||||||
|
|
Loading…
Reference in a new issue