aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-12-26 15:33:06 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-12-26 15:33:06 +0000
commit253c07733ea4ad887682ddc94390f88dc4013fcc (patch)
tree7caf3776ceb0171acc6548499f3146a6280a0978
parent9e35894f5e52220e6ae68b7917cfde1a703708f2 (diff)
downloadforums-253c07733ea4ad887682ddc94390f88dc4013fcc.tar
forums-253c07733ea4ad887682ddc94390f88dc4013fcc.tar.gz
forums-253c07733ea4ad887682ddc94390f88dc4013fcc.tar.bz2
forums-253c07733ea4ad887682ddc94390f88dc4013fcc.tar.xz
forums-253c07733ea4ad887682ddc94390f88dc4013fcc.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/trunk@8286 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/functions_content.php15
1 files changed, 12 insertions, 3 deletions
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))