diff options
| author | Bruno Ais <brunoaiss@gmail.com> | 2012-05-02 17:13:39 +0100 |
|---|---|---|
| committer | Bruno Ais <brunoaiss@gmail.com> | 2012-05-02 17:13:39 +0100 |
| commit | 593ef7885957fec3ac5f1a45b9ff04bed9254105 (patch) | |
| tree | e1c28f52646d06b781ac23f77e0bf795a9b9d04c /phpBB/includes/functions_content.php | |
| parent | 06f4ef8852ef137b4a721c89a8e7535151df9811 (diff) | |
| download | forums-593ef7885957fec3ac5f1a45b9ff04bed9254105.tar forums-593ef7885957fec3ac5f1a45b9ff04bed9254105.tar.gz forums-593ef7885957fec3ac5f1a45b9ff04bed9254105.tar.bz2 forums-593ef7885957fec3ac5f1a45b9ff04bed9254105.tar.xz forums-593ef7885957fec3ac5f1a45b9ff04bed9254105.zip | |
[ticket/10845] Remove censor from text
In order to remove the censor, I added a new parameter to
generate_text_for_display(), that new parameter is used to tell if the text
should be censored or not. Defaults to true.
PHPBB3-10845
Diffstat (limited to 'phpBB/includes/functions_content.php')
| -rw-r--r-- | phpBB/includes/functions_content.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 6b2ee98d7a..70d826eead 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -408,7 +408,7 @@ function strip_bbcode(&$text, $uid = '') * For display of custom parsed text on user-facing pages * Expects $text to be the value directly from the database (stored value) */ -function generate_text_for_display($text, $uid, $bitfield, $flags) +function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text = true) { static $bbcode; @@ -417,7 +417,10 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) return ''; } - $text = censor_text($text); + if ($censor_text) + { + $text = censor_text($text); + } // Parse bbcode if bbcode uid stored and bbcode enabled if ($uid && ($flags & OPTION_FLAG_BBCODE)) |
