1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 12:03:21 +01:00

[feature/php-events] Add additional vars and control to viewtopic_postrow event

PHPBB3-9550
This commit is contained in:
Joas Schilling 2012-06-20 16:07:49 +02:00
parent 45d534978b
commit f01d742b56

View File

@ -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']), '<a href="' . $viewtopic_url . "&amp;p={$row['post_id']}&amp;view=show#p{$row['post_id']}" . '">', '</a>') : '',
);
$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);