From 575980cba981c2522cc7d3e66e64b9c8fbc36511 Mon Sep 17 00:00:00 2001 From: David King Date: Wed, 22 Aug 2012 09:37:47 -0400 Subject: [PATCH] [feature/add_events] Remove $allow_bbcode and $allow_smilies Upon testing it was discovered that these did not work as originally intended. PHPBB3-9550 --- phpBB/includes/functions_content.php | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 81ac15f168..7fb6ff44cf 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -418,7 +418,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) return ''; } - $censor_text = $allow_bbcode = $allow_smilies = true; + $censor_text = true; /** * Use this event to modify the text before it is parsed @@ -429,11 +429,9 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) * @var string bitfield The BBCode Bitfield * @var int flags The BBCode Flags * @var bool censor_text Whether or not to apply word censors - * @var bool allow_bbcode Whether or not to parse BBCode - * @var bool allow_smilies Whether or not to parse Smilies * @since 3.1-A1 */ - $vars = array('text', 'uid', 'bitfield', 'flags', 'censor_text', 'allow_bbcode', 'allow_smilies'); + $vars = array('text', 'uid', 'bitfield', 'flags', 'censor_text'); extract($phpbb_dispatcher->trigger_event('core.modify_text_for_display_before', compact($vars))); if ($censor_text) @@ -442,7 +440,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) } // Parse bbcode if bbcode uid stored and bbcode enabled - if ($uid && ($flags & OPTION_FLAG_BBCODE) && $allow_bbcode) + if ($uid && ($flags & OPTION_FLAG_BBCODE)) { if (!class_exists('bbcode')) { @@ -463,11 +461,7 @@ function generate_text_for_display($text, $uid, $bitfield, $flags) } $text = bbcode_nl2br($text); - - if ($allow_smilies) - { - $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES)); - } + $text = smiley_text($text, !($flags & OPTION_FLAG_SMILIES)); /** * Use this event to modify the text after it is parsed