mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
7ed89f3c4b
1 changed files with 40 additions and 2 deletions
|
@ -77,6 +77,22 @@ class ucp_main
|
||||||
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
|
// If the user can't see any forums, he can't read any posts because fid of 0 is invalid
|
||||||
if (!empty($forum_ary))
|
if (!empty($forum_ary))
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Modify sql variables before query is processed
|
||||||
|
*
|
||||||
|
* @event core.ucp_main_front_modify_sql
|
||||||
|
* @var string sql_select SQL select
|
||||||
|
* @var string sql_from SQL from
|
||||||
|
* @var array forum_ary Forum array
|
||||||
|
* @since 3.2.4-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'sql_select',
|
||||||
|
'sql_from',
|
||||||
|
'forum_ary',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_sql', compact($vars)));
|
||||||
|
|
||||||
$sql = "SELECT t.* $sql_select
|
$sql = "SELECT t.* $sql_select
|
||||||
FROM $sql_from
|
FROM $sql_from
|
||||||
WHERE t.topic_type = " . POST_GLOBAL . '
|
WHERE t.topic_type = " . POST_GLOBAL . '
|
||||||
|
@ -144,7 +160,7 @@ class ucp_main
|
||||||
$folder_img .= '_mine';
|
$folder_img .= '_mine';
|
||||||
}
|
}
|
||||||
|
|
||||||
$template->assign_block_vars('topicrow', array(
|
$topicrow = array(
|
||||||
'FORUM_ID' => $forum_id,
|
'FORUM_ID' => $forum_id,
|
||||||
'TOPIC_ID' => $topic_id,
|
'TOPIC_ID' => $topic_id,
|
||||||
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
'TOPIC_AUTHOR' => get_username_string('username', $row['topic_poster'], $row['topic_first_poster_name'], $row['topic_first_poster_colour']),
|
||||||
|
@ -171,8 +187,30 @@ class ucp_main
|
||||||
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
'U_LAST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'],
|
||||||
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
'U_LAST_POST_AUTHOR' => get_username_string('profile', $row['topic_last_poster_id'], $row['topic_last_poster_name'], $row['topic_last_poster_colour']),
|
||||||
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
'U_NEWEST_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread',
|
||||||
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"))
|
'U_VIEW_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id"),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add template variables to a front topics row.
|
||||||
|
*
|
||||||
|
* @event core.ucp_main_front_modify_template_vars
|
||||||
|
* @var array topicrow Array containing the template variables for the row
|
||||||
|
* @var array row Array containing the subscribed forum row data
|
||||||
|
* @var int forum_id Forum ID
|
||||||
|
* @var string folder_img Folder image
|
||||||
|
* @var string folder_alt Alt text for the folder image
|
||||||
|
* @since 3.2.4-RC1
|
||||||
|
*/
|
||||||
|
$vars = array(
|
||||||
|
'topicrow',
|
||||||
|
'row',
|
||||||
|
'forum_id',
|
||||||
|
'folder_img',
|
||||||
|
'folder_alt',
|
||||||
|
);
|
||||||
|
extract($phpbb_dispatcher->trigger_event('core.ucp_main_front_modify_template_vars', compact($vars)));
|
||||||
|
|
||||||
|
$template->assign_block_vars('topicrow', $topicrow);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($config['load_user_activity'])
|
if ($config['load_user_activity'])
|
||||||
|
|
Loading…
Add table
Reference in a new issue