mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/11749] Move event after all template data has been defined
PHPBB3-11749
This commit is contained in:
parent
8e636e4572
commit
9902f1c751
1 changed files with 15 additions and 13 deletions
|
@ -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&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&hilit=' . $u_hilit : '')) . '#p' . $row['post_id'] : '')
|
||||
'U_VIEW_POST' => (!empty($row['post_id'])) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=" . $row['topic_id'] . '&p=' . $row['post_id'] . (($u_hilit) ? '&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);
|
||||
|
|
Loading…
Add table
Reference in a new issue