[feature/events] Fix core.viewforum_topicrow ledge

PHPBB3-9550
This commit is contained in:
Michael Cullum 2012-03-16 00:02:35 +00:00 committed by Joas Schilling
parent 57c4171577
commit 6c50f6610f

View file

@ -690,7 +690,7 @@ if (sizeof($topic_list))
$u_mcp_queue = ($topic_unapproved || $posts_unapproved) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=' . (($topic_unapproved) ? 'approve_details' : 'unapproved_posts') . "&t=$topic_id", true, $user->session_id) : '';
// Send vars to template
$forumrow = array(
$topicrow = 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,15 +742,15 @@ if (sizeof($topic_list))
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=reports&f=' . $row['forum_id'] . '&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,
);
$vars = array('forumrow');
$vars = array('topicrow');
$event = new phpbb_event_data(compact($vars));
$phpbb_dispatcher->dispatch('core.viewforum_forumrow', $event);
$phpbb_dispatcher->dispatch('core.viewforum_topicrow', $event);
extract($event->get_data_filtered($vars));
$template->assign_block_vars('topicrow', $forumrow);
$template->assign_block_vars('topicrow', $topicrow);
phpbb_generate_template_pagination($template, $view_topic_url, 'topicrow.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);