[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
This commit is contained in:
javiexin 2015-05-04 20:34:54 +02:00
parent 34602037dc
commit 6e0d12094a

View file

@ -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',