mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
- introducing read/unread images in the MCP, if you view something through the MCP it will not update the "read" status of a post/topic/forum [includes Bug #6796]
git-svn-id: file:///svn/phpbb/trunk@6936 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -82,7 +82,7 @@ class mcp_queue
|
||||
}
|
||||
}
|
||||
|
||||
$post_info = get_post_data(array($post_id), 'm_approve');
|
||||
$post_info = get_post_data(array($post_id), 'm_approve', true);
|
||||
|
||||
if (!sizeof($post_info))
|
||||
{
|
||||
@@ -99,6 +99,21 @@ class mcp_queue
|
||||
);
|
||||
}
|
||||
|
||||
$topic_tracking_info = array();
|
||||
// Get topic tracking info
|
||||
if ($config['load_db_lastread'])
|
||||
{
|
||||
$tmp_topic_data = array($post_info['topic_id'] => $post_info);
|
||||
$topic_tracking_info = get_topic_tracking($post_info['forum_id'], $post_info['topic_id'], $tmp_topic_data, array($post_info['forum_id'] => $post_info['forum_mark_time']));
|
||||
unset($tmp_topic_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
$topic_tracking_info = get_complete_topic_tracking($post_info['forum_id'], $post_info['topic_id']);
|
||||
}
|
||||
|
||||
$post_unread = (isset($topic_tracking_info[$post_info['topic_id']]) && $post_info['post_time'] > $topic_tracking_info[$post_info['topic_id']]) ? true : false;
|
||||
|
||||
// Process message, leave it uncensored
|
||||
$message = $post_info['post_text'];
|
||||
$message = str_replace("\n", '<br />', $message);
|
||||
@@ -130,6 +145,8 @@ class mcp_queue
|
||||
'U_VIEW_POST' => $post_url,
|
||||
'U_VIEW_TOPIC' => $topic_url,
|
||||
|
||||
'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'),
|
||||
|
||||
'RETURN_QUEUE' => sprintf($user->lang['RETURN_QUEUE'], '<a href="' . append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue' . (($topic_id) ? '&mode=unapproved_topics' : '&mode=unapproved_posts')) . "&start=$start\">", '</a>'),
|
||||
'RETURN_POST' => sprintf($user->lang['RETURN_POST'], '<a href="' . $post_url . '">', '</a>'),
|
||||
'RETURN_TOPIC_SIMPLE' => sprintf($user->lang['RETURN_TOPIC_SIMPLE'], '<a href="' . $topic_url . '">', '</a>'),
|
||||
|
Reference in New Issue
Block a user