diff options
author | Cesar G <prototech91@gmail.com> | 2015-10-11 15:33:53 -0700 |
---|---|---|
committer | Cesar G <prototech91@gmail.com> | 2015-10-11 15:46:43 -0700 |
commit | 0a93db705bf8f8759db9e8a55e24804161732c65 (patch) | |
tree | 1c522f4cd67783779d41d28fb94e8b0562c409c9 /phpBB/includes/functions_content.php | |
parent | 87b9cede4bb11fd501d89146bfd13c2e9623924f (diff) | |
download | forums-0a93db705bf8f8759db9e8a55e24804161732c65.tar forums-0a93db705bf8f8759db9e8a55e24804161732c65.tar.gz forums-0a93db705bf8f8759db9e8a55e24804161732c65.tar.bz2 forums-0a93db705bf8f8759db9e8a55e24804161732c65.tar.xz forums-0a93db705bf8f8759db9e8a55e24804161732c65.zip |
[ticket/13993] Do not parse signatures as posts when editing them.
The implementation of PHPBB3-12516 changed the manual use of the message parser
to using generate_text_for_storage(). The function does not support
parse_message::parse()'s mode parameter, thus all the error checks on the sig
are invalid.
PHPBB3-13993
Diffstat (limited to 'phpBB/includes/functions_content.php')
-rw-r--r-- | phpBB/includes/functions_content.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 345df1d47a..2203694093 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -564,10 +564,11 @@ function generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text * @param bool $allow_flash_bbcode * @param bool $allow_quote_bbcode * @param bool $allow_url_bbcode +* @param string $mode Mode to parse text as, e.g. post or sig * * @return array An array of string with the errors that occurred while parsing */ -function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true) +function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $mode = 'post') { global $phpbb_root_path, $phpEx, $phpbb_dispatcher; @@ -586,7 +587,9 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb * @var bool allow_flash_bbcode Whether or not to parse the [flash] BBCode * @var bool allow_quote_bbcode Whether or not to parse the [quote] BBCode * @var bool allow_url_bbcode Whether or not to parse the [url] BBCode + * @var string mode Mode to parse text as, e.g. post or sig * @since 3.1.0-a1 + * @changed 3.2.0-a1 */ $vars = array( 'text', @@ -600,6 +603,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb 'allow_flash_bbcode', 'allow_quote_bbcode', 'allow_url_bbcode', + 'mode', ); extract($phpbb_dispatcher->trigger_event('core.modify_text_for_storage_before', compact($vars))); @@ -612,7 +616,7 @@ function generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bb } $message_parser = new parse_message($text); - $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode); + $message_parser->parse($allow_bbcode, $allow_urls, $allow_smilies, $allow_img_bbcode, $allow_flash_bbcode, $allow_quote_bbcode, $allow_url_bbcode, true, $mode); $text = $message_parser->message; $uid = $message_parser->bbcode_uid; |