mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[feature/add_events] Remove $allow_bbcode and $allow_smilies
Upon testing it was discovered that these did not work as originally intended. PHPBB3-9550
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this event to modify the text after it is parsed
|
||||
|
Reference in New Issue
Block a user