]> git.mxchange.org Git - friendica.git/commitdiff
Prioritize the title over the content warning
authorMichael <heluecht@pirati.ca>
Tue, 22 Mar 2022 07:00:44 +0000 (07:00 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 22 Mar 2022 07:00:44 +0000 (07:00 +0000)
src/Content/Conversation.php
src/Object/Post.php

index 48265ce5138ebdb9b2d8bd353a6503888527a2af..ac37a3a8babac6165a223839bdffc2a57c51bbad 100644 (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 = [
index 253b4b4f18a42d467b0e286e3e5909b895bf06f6..b5c058dfd9a9b24db04cc4fee58f45abed32ad42 100644 (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')) {