Merge pull request #4952 from MrPetovan/bug/4947-fix-content-filter-self

Fix own post check for content filter
This commit is contained in:
Tobias Diekershoff 2018-04-29 06:41:55 +02:00 committed by GitHub
commit cb364f440f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1249,7 +1249,7 @@ function prepare_body(array &$item, $attach = false, $is_preview = false)
// Compile eventual content filter reasons
$filter_reasons = [];
if (!$is_preview && !($item['self'] && local_user() == $item['uid'])) {
if (!$is_preview && public_contact() != $item['author-id']) {
if (!empty($item['content-warning']) && (!local_user() || !PConfig::get(local_user(), 'system', 'disable_cw', false))) {
$filter_reasons[] = L10n::t('Content warning: %s', $item['content-warning']);
}