aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2012-06-20 16:07:49 +0200
committerJoas Schilling <nickvergessen@gmx.de>2012-08-01 10:18:51 +0200
commitf01d742b5649678de3e5ba4aa45f4176c8ff5aac (patch)
treec3b299b078fcdb4cec0afef303333f68698e8b00
parent45d534978b4d5f20666dbf9b8de721fe02197746 (diff)
downloadforums-f01d742b5649678de3e5ba4aa45f4176c8ff5aac.tar
forums-f01d742b5649678de3e5ba4aa45f4176c8ff5aac.tar.gz
forums-f01d742b5649678de3e5ba4aa45f4176c8ff5aac.tar.bz2
forums-f01d742b5649678de3e5ba4aa45f4176c8ff5aac.tar.xz
forums-f01d742b5649678de3e5ba4aa45f4176c8ff5aac.zip
[feature/php-events] Add additional vars and control to viewtopic_postrow event
PHPBB3-9550
-rw-r--r--phpBB/viewtopic.php8
1 files 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']), '<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);