aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorRuslan Uzdenov <rxu@mail.ru>2009-08-18 14:51:08 +0000
committerRuslan Uzdenov <rxu@mail.ru>2009-08-18 14:51:08 +0000
commitd2d5ecef8d5fba02747b57e58bb89360100ea021 (patch)
tree5505b2f3c145cb0777d72adb1453bdba2e75dece /phpBB/includes/functions.php
parent54362bbe2bd3155262f3a8c7dd3034facc97b06c (diff)
downloadforums-d2d5ecef8d5fba02747b57e58bb89360100ea021.tar
forums-d2d5ecef8d5fba02747b57e58bb89360100ea021.tar.gz
forums-d2d5ecef8d5fba02747b57e58bb89360100ea021.tar.bz2
forums-d2d5ecef8d5fba02747b57e58bb89360100ea021.tar.xz
forums-d2d5ecef8d5fba02747b57e58bb89360100ea021.zip
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
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 12272b152c..6750772ebb 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -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))