From d38b86dabf6f35a94ecd70c65545c9cf2083ff19 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Sun, 1 Apr 2018 15:15:05 -0400 Subject: [PATCH] Fix disabled content filter for own posts --- include/text.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/text.php b/include/text.php index 3ce6c89aaa..b1a9f70d02 100644 --- a/include/text.php +++ b/include/text.php @@ -1270,7 +1270,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false) // Compile eventual content filter reasons $filter_reasons = []; - if (!$is_preview && !$item['self']) { + if (!$is_preview && !($item['self'] && local_user() == $item['uid'])) { if (!empty($item['content-warning']) && (!local_user() || !PConfig::get(local_user(), 'social', 'disable_cw', false))) { $filter_reasons[] = L10n::t('Content warning: %s', $item['content-warning']); } @@ -1305,9 +1305,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false) $s = $hook_data['html']; unset($hook_data); - if (!$is_preview && !$item['self']) { - $s = apply_content_filter($s, $filter_reasons); - } + $s = apply_content_filter($s, $filter_reasons); if (! $attach) { // Replace the blockquotes with quotes that are used in mails. -- 2.39.5