From f01d742b5649678de3e5ba4aa45f4176c8ff5aac Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 20 Jun 2012 16:07:49 +0200 Subject: [PATCH] [feature/php-events] Add additional vars and control to viewtopic_postrow event PHPBB3-9550 --- phpBB/viewtopic.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 7a1b9ba9e4..20d4c2af1b 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1582,14 +1582,16 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '', '') : '', ); + $user_poster_data = $user_cache[$poster_id]; + + $vars = array('row', 'cp_row', 'user_poster_data', 'postrow'); + extract($phpbb_dispatcher->trigger_event('core.viewtopic_postrow', compact($vars))); + if (isset($cp_row['row']) && sizeof($cp_row['row'])) { $postrow = array_merge($postrow, $cp_row['row']); } - $vars = array('postrow'); - extract($phpbb_dispatcher->trigger_event('core.viewtopic_postrow', compact($vars))); - // Dump vars into template $template->assign_block_vars('postrow', $postrow);