aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorMáté Bartus <CHItA@users.noreply.github.com>2017-09-07 15:09:48 +0200
committerGitHub <noreply@github.com>2017-09-07 15:09:48 +0200
commit114f38648b837530e2656d3c67941c003ae9f91b (patch)
tree6ed0ccc78b40c1175af407b34900c306550d9798 /phpBB/includes
parentf6166225cfea68e5b7f8dd1e6ef7df8e4fd1e8b3 (diff)
parentde6a0a7dc1e0e52f05e7b5ced085ef8f17650ff1 (diff)
downloadforums-114f38648b837530e2656d3c67941c003ae9f91b.tar
forums-114f38648b837530e2656d3c67941c003ae9f91b.tar.gz
forums-114f38648b837530e2656d3c67941c003ae9f91b.tar.bz2
forums-114f38648b837530e2656d3c67941c003ae9f91b.tar.xz
forums-114f38648b837530e2656d3c67941c003ae9f91b.zip
Merge pull request #4900 from rxu/ticket/15318
[ticket/15318] Make user option to disable word censoring effective again
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_content.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index c3e7a7ceb7..06223027d8 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -557,6 +557,7 @@ function strip_bbcode(&$text, $uid = '')
function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text = true)
{
static $bbcode;
+ global $auth, $config, $user;
global $phpbb_dispatcher, $phpbb_container;
if ($text === '')
@@ -584,6 +585,13 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text
// Temporarily switch off viewcensors if applicable
$old_censor = $renderer->get_viewcensors();
+
+ // Check here if the user is having viewing censors disabled (and also allowed to do so).
+ if (!$user->optionget('viewcensors') && $config['allow_nocensors'] && $auth->acl_get('u_chgcensors'))
+ {
+ $censor_text = false;
+ }
+
if ($old_censor !== $censor_text)
{
$renderer->set_viewcensors($censor_text);