From 6e0d12094abed711e4c50d0d9d62de9d425673fd Mon Sep 17 00:00:00 2001 From: javiexin Date: Mon, 4 May 2015 20:34:54 +0200 Subject: [PATCH] [ticket/13795] Modify core event in posting to include poll data Modified the core.posting_modify_template_vars event in posting.php to extend the content of the page_data array to include poll data. That required moving the event and merging the new set of template vars. Also include the poll variable in the parameter list for event core.posting_modify_submission_errors, as it was missing, and any modification here on post_data for poll related data is silently ignored. PHPBB3-13795 --- phpBB/posting.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/posting.php b/phpBB/posting.php index 20cb14b4b5..1ee4e0c22a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1238,6 +1238,7 @@ if ($submit || $preview || $refresh) * * @event core.posting_modify_submission_errors * @var array post_data Array with post data + * @var array poll Array with poll data from post (must be used instead of the post_data equivalent) * @var string mode What action to take if the form is submitted * post|reply|quote|edit|delete|bump|smilies|popup * @var string page_title Title of the mode page @@ -1251,6 +1252,7 @@ if ($submit || $preview || $refresh) */ $vars = array( 'post_data', + 'poll', 'mode', 'page_title', 'post_id',