mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-13 20:24:08 +02:00
Better tracking of global announcements
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10018 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1730,13 +1730,13 @@ function get_unread_topics_list($user_id = false, $sql_extra = '')
|
||||
$tracked_topics_list = array_merge(array_keys($unread_topics_list), array_keys($read_topics_list));
|
||||
|
||||
// And the last step - find unread topics were not found before (that can mean a user has never read some forums)
|
||||
$sql = 'SELECT topic_id
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_last_post_time > ' . (int) $user->data['user_lastmark'] . '
|
||||
AND ' . $db->sql_in_set('topic_id', $tracked_topics_list, true, true) . '
|
||||
AND ' . $db->sql_in_set('forum_id', $tracked_forums_list, true, true) . "
|
||||
$sql = 'SELECT t.topic_id
|
||||
FROM ' . TOPICS_TABLE . ' t
|
||||
WHERE t.topic_last_post_time > ' . (int) $user->data['user_lastmark'] . '
|
||||
AND ' . $db->sql_in_set('t.topic_id', $tracked_topics_list, true, true) . '
|
||||
AND ' . $db->sql_in_set('t.forum_id', $tracked_forums_list, true, true) . "
|
||||
$sql_extra
|
||||
ORDER BY topic_last_post_time DESC";
|
||||
ORDER BY t.topic_last_post_time DESC";
|
||||
$result = $db->sql_query_limit($sql, 1000);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
Reference in New Issue
Block a user