aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/search.php
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2013-07-29 00:05:31 -0700
committerMatt Friedman <maf675@gmail.com>2013-07-29 00:05:31 -0700
commit9902f1c75178aa72d3b89f51033fcda552141b40 (patch)
tree34e8e4a12b6a7c0a97753d5bbc82142869e4934e /phpBB/search.php
parent8e636e4572ef11af61f2b2c6dfb56d7a9530c8de (diff)
downloadforums-9902f1c75178aa72d3b89f51033fcda552141b40.tar
forums-9902f1c75178aa72d3b89f51033fcda552141b40.tar.gz
forums-9902f1c75178aa72d3b89f51033fcda552141b40.tar.bz2
forums-9902f1c75178aa72d3b89f51033fcda552141b40.tar.xz
forums-9902f1c75178aa72d3b89f51033fcda552141b40.zip
[ticket/11749] Move event after all template data has been defined
PHPBB3-11749
Diffstat (limited to 'phpBB/search.php')
-rw-r--r--phpBB/search.php28
1 files changed, 15 insertions, 13 deletions
diff --git a/phpBB/search.php b/phpBB/search.php
index d0484bf598..40c0b9a8ce 100644
--- a/phpBB/search.php
+++ b/phpBB/search.php
@@ -1001,18 +1001,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
);
}
- /**
- * Modify the topic data before it is assigned to the template
- *
- * @event core.search_modify_tpl_ary
- * @var array row Array with topic data
- * @var array tpl_ary Template block array with topic data
- * @since 3.1-A1
- */
- $vars = array('row', 'tpl_ary');
- extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars)));
-
- $template->assign_block_vars('searchresults', array_merge($tpl_ary, array(
+ $tpl_ary = array_merge($tpl_ary, array(
'FORUM_ID' => $forum_id,
'TOPIC_ID' => $result_topic_id,
'POST_ID' => ($show_results == 'posts') ? $row['post_id'] : false,
@@ -1024,9 +1013,22 @@ if ($keywords || $author || $author_id || $search_id || $submit)
'U_VIEW_TOPIC' => $view_topic_url,
'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id),
- 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
+ 'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=" . $row['topic_id'] . '&amp;p=' . $row['post_id'] . (($u_hilit) ? '&amp;hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '',
));
+ /**
+ * Modify the topic data before it is assigned to the template
+ *
+ * @event core.search_modify_tpl_ary
+ * @var array row Array with topic data
+ * @var array tpl_ary Template block array with topic data
+ * @since 3.1-A1
+ */
+ $vars = array('row', 'tpl_ary');
+ extract($phpbb_dispatcher->trigger_event('core.search_modify_tpl_ary', compact($vars)));
+
+ $template->assign_block_vars('searchresults', $tpl_ary);
+
if ($show_results == 'topics')
{
phpbb_generate_template_pagination($template, $view_topic_url, 'searchresults.pagination', 'start', $replies + 1, $config['posts_per_page'], 1, true, true);