]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Display content warning as title if collapsing is deactivated
[friendica.git] / src / Object / Post.php
index ecc6956be7c6ff8fffeeaca5b9380002ec2c807b..f47efbecd24ac4ffbe4f5da53600f97f83b2b25a 100644 (file)
@@ -316,7 +316,13 @@ class Post extends BaseObject
                $body_e       = $body;
                $text_e       = strip_tags($body);
                $name_e       = $profile_name;
-               $title_e      = $item['title'];
+
+               if (!empty($item['content-warning']) && PConfig::get(local_user(), 'social', 'disable_cw', false)) {
+                       $title_e = ucfirst($item['content-warning']);
+               } else {
+                       $title_e = $item['title'];
+               }
+
                $location_e   = $location;
                $owner_name_e = $this->getOwnerName();