From c2dace762ec295c7a2d67758006b1fff56f1f573 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sun, 20 Apr 2014 15:13:13 +0200 Subject: [ticket/12273] Fix long $vars lines for existing events PHPBB3-12273 --- phpBB/viewtopic.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ad7e8c29bc..5be578423f 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1000,7 +1000,8 @@ $sql_ary = array( * @since 3.1-A1 * @change 3.1.0-a2 Added vars forum_id, topic_id, topic_data, post_list, sort_days, sort_key, sort_dir, start */ -$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days', 'sort_key', 'sort_dir', 'start', 'sql_ary'); +$vars = array('forum_id', 'topic_id', 'topic_data', 'post_list', 'sort_days'); +$vars = array_merge($vars, array('sort_key', 'sort_dir', 'start', 'sql_ary')); extract($phpbb_dispatcher->trigger_event('core.viewtopic_get_post_data', compact($vars))); $sql = $db->sql_build_query('SELECT', $sql_ary); @@ -1679,7 +1680,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @change 3.1.0-a3 Added vars start, current_row_number, end, attachments * @change 3.1.0-b3 Added topic_data array, total_posts */ - $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row', 'topic_data'); + $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row'); + $vars = array_merge($vars, array('attachments', 'user_poster_data', 'post_row', 'topic_data')); extract($phpbb_dispatcher->trigger_event('core.viewtopic_modify_post_row', compact($vars))); $i = $current_row_number; @@ -1726,14 +1728,18 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) * @var int start Start item of this page * @var int current_row_number Number of the post on this page * @var int end Number of posts on this page + * @var int total_posts Total posts count * @var array row Array with original post and user data * @var array cp_row Custom profile field data of the poster * @var array attachments List of attachments * @var array user_poster_data Poster's data from user cache * @var array post_row Template block array of the post + * @var array topic_data Array with topic data * @since 3.1.0-a3 + * @change 3.1.0-b3 Added topic_data array, total_posts */ - $vars = array('start', 'current_row_number', 'end', 'row', 'cp_row', 'attachments', 'user_poster_data', 'post_row'); + $vars = array('start', 'current_row_number', 'end', 'total_posts', 'row', 'cp_row'); + $vars = array_merge($vars, array('attachments', 'user_poster_data', 'post_row', 'topic_data')); extract($phpbb_dispatcher->trigger_event('core.viewtopic_post_row_after', compact($vars))); $i = $current_row_number; -- cgit v1.2.1