diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2007-12-26 15:33:06 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2007-12-26 15:33:06 +0000 |
commit | 9b1c8531e36b9b88d676985a43e59bdf7e819516 (patch) | |
tree | aa0775fca18adbd916c9df0e1586d01ee9d3db07 | |
parent | b2187d3c8302246e5f15106ad973d253e64c3560 (diff) | |
download | forums-9b1c8531e36b9b88d676985a43e59bdf7e819516.tar forums-9b1c8531e36b9b88d676985a43e59bdf7e819516.tar.gz forums-9b1c8531e36b9b88d676985a43e59bdf7e819516.tar.bz2 forums-9b1c8531e36b9b88d676985a43e59bdf7e819516.tar.xz forums-9b1c8531e36b9b88d676985a43e59bdf7e819516.zip |
re-allow disabling of word censors (we somehow forgot to commit this, i really do not know why :/)
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8286 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 1 | ||||
-rw-r--r-- | phpBB/includes/functions_content.php | 15 |
2 files changed, 13 insertions, 3 deletions
diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 00f54c0abf..3537cb5a0b 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -86,6 +86,7 @@ <ul> <li>[Change] Validate birthdays (Bug #15004)</li> <li>[Fix] Allow correct avatar caching for CGI installations. (thanks wildbill)</li> + <li>[Fix] Fix disabling of word censor, now possible again</li> </ul> <a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3> diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index b072895226..c0acd2eb41 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -647,12 +647,21 @@ function make_clickable($text, $server_url = false, $class = 'postlink') function censor_text($text) { static $censors; - global $cache; + // We moved the word censor checks in here because we call this function quite often - and then only need to do the check once if (!isset($censors) || !is_array($censors)) { - // obtain_word_list is taking care of the users censor option and the board-wide option - $censors = $cache->obtain_word_list(); + global $config, $user, $auth, $cache; + + // We 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')) + { + $censors = array(); + } + else + { + $censors = $cache->obtain_word_list(); + } } if (sizeof($censors)) |