diff options
author | rxu <rxu@mail.ru> | 2016-02-27 12:08:58 +0700 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2016-02-27 12:08:58 +0700 |
commit | cd3b93b9e2ef93575d84ca3de4aef741938d2bbc (patch) | |
tree | e900210c3d309b61baf7579f1b3db6f7bcdf9a4a /phpBB/includes/functions_content.php | |
parent | fb78fc7ae0d870262483f9dcc588601cd656b66b (diff) | |
download | forums-cd3b93b9e2ef93575d84ca3de4aef741938d2bbc.tar forums-cd3b93b9e2ef93575d84ca3de4aef741938d2bbc.tar.gz forums-cd3b93b9e2ef93575d84ca3de4aef741938d2bbc.tar.bz2 forums-cd3b93b9e2ef93575d84ca3de4aef741938d2bbc.tar.xz forums-cd3b93b9e2ef93575d84ca3de4aef741938d2bbc.zip |
[ticket/14366] Add core events to the function decode_message()
Remove match/replace vars, use alternative var for the message var,
update the target phpBB version.
PHPBB3-14366
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r-- | phpBB/includes/functions_content.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 4fb76a6f7e..1c53c69027 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -409,14 +409,14 @@ function decode_message(&$message, $bbcode_uid = '') * Use this event to modify the message before it is decoded * * @event core.decode_message_before - * @var string message The message content + * @var string message_text The message content * @var string bbcode_uid The message BBCode UID - * @var string match Match pattern to replace - * @var int replace Replacement for the matched text - * @since 3.1.8-RC1 + * @since 3.1.9-RC1 */ - $vars = array('message', 'bbcode_uid', 'match', 'replace'); + $message_text = $message; + $vars = array('message_text', 'bbcode_uid'); extract($phpbb_dispatcher->trigger_event('core.decode_message_before', compact($vars))); + $message = $message_text; $message = str_replace($match, $replace, $message); @@ -429,14 +429,14 @@ function decode_message(&$message, $bbcode_uid = '') * Use this event to modify the message after it is decoded * * @event core.decode_message_after - * @var string message The message content + * @var string message_text The message content * @var string bbcode_uid The message BBCode UID - * @var string match Match pattern to replace - * @var int replace Replacement for the matched text - * @since 3.1.8-RC1 + * @since 3.1.9-RC1 */ - $vars = array('message', 'bbcode_uid', 'match', 'replace'); + $message_text = $message; + $vars = array('message_text', 'bbcode_uid'); extract($phpbb_dispatcher->trigger_event('core.decode_message_after', compact($vars))); + $message = $message_text; } /** |