aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-08-20 09:09:53 -0400
committerDavid King <imkingdavid@gmail.com>2012-08-20 09:09:53 -0400
commit310c9069328172a7c0cb890d96b5eb4d14523e78 (patch)
tree8a64fcb4ee4e1321e803aef6c79b12895e1d01d5 /phpBB/viewforum.php
parent8c62c33f2a8ab48f05938d55c80b1bf37f9a37d5 (diff)
parentb567175c8d49b774e48fe7cf632d96babb434076 (diff)
downloadforums-310c9069328172a7c0cb890d96b5eb4d14523e78.tar
forums-310c9069328172a7c0cb890d96b5eb4d14523e78.tar.gz
forums-310c9069328172a7c0cb890d96b5eb4d14523e78.tar.bz2
forums-310c9069328172a7c0cb890d96b5eb4d14523e78.tar.xz
forums-310c9069328172a7c0cb890d96b5eb4d14523e78.zip
Merge remote-tracking branch 'nickvergessen/feature/php-events-4' into develop
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index f4781a09ff..783c7181d2 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -690,7 +690,7 @@ if (sizeof($topic_list))
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&amp;mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&amp;t=$topic_id", true, $user->session_id) : '';
// Send vars to template
- $template->assign_block_vars('topicrow', array(
+ $topic_row = array(
'FORUM_ID' => $row['forum_id'],
'TOPIC_ID' => $topic_id,
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
@@ -742,11 +742,24 @@ if (sizeof($topic_list))
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&amp;mode=reports&amp;f=' . $row['forum_id'] . '&amp;t=' . $topic_id, true, $user->session_id),
'U_MCP_QUEUE' => $u_mcp_queue,
- 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test)
+ 'S_TOPIC_TYPE_SWITCH' => ($s_type_switch == $s_type_switch_test) ? -1 : $s_type_switch_test,
);
+ /**
+ * Modify the topic data before it is assigned to the template
+ *
+ * @event core.viewforum_modify_topicrow
+ * @var array row Array with topic data
+ * @var array topic_row Template array with topic data
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'topic_row');
+ extract($phpbb_dispatcher->trigger_event('core.viewforum_modify_topicrow', compact($vars)));
+
+ $template->assign_block_vars('topicrow', $topic_row);
+
phpbb_generate_template_pagination($template, $view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);
-
+
$s_type_switch = ($row['topic_type'] == POST_ANNOUNCE || $row['topic_type'] == POST_GLOBAL) ? 1 : 0;
if ($unread_topic)