diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2009-09-20 18:50:35 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2009-09-20 18:50:35 +0000 |
commit | 5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5 (patch) | |
tree | fae4f300cc8d2ba47009e56747c2a9a2b9690b98 /phpBB/includes | |
parent | 0e130c107b83199709409b3fe1ff362582663b4e (diff) | |
download | forums-5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5.tar forums-5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5.tar.gz forums-5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5.tar.bz2 forums-5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5.tar.xz forums-5382eb441d1dcf7c5bc2a1a49a4924d51fb151f5.zip |
remove unnecessary query parts... thanks to asinshesq for pointing it out.
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10172 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 747b624548..e787932441 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1693,11 +1693,11 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s 'LEFT_JOIN' => array( array( 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'), - 'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id AND tt.mark_time > $last_mark", + 'ON' => "tt.user_id = $user_id AND t.topic_id = tt.topic_id", ), array( 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), - 'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id AND ft.mark_time > $last_mark", + 'ON' => "ft.user_id = $user_id AND t.forum_id = ft.forum_id", ), ), @@ -1705,10 +1705,7 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s ( (tt.mark_time IS NOT NULL AND t.topic_last_post_time > tt.mark_time) OR (tt.mark_time IS NULL AND ft.mark_time IS NOT NULL AND t.topic_last_post_time > ft.mark_time) OR - ( - ((tt.mark_time IS NULL AND ft.mark_time IS NULL) OR (tt.mark_time < $last_mark AND ft.mark_time < $last_mark)) - AND t.topic_last_post_time > $last_mark - ) + (tt.mark_time IS NULL AND ft.mark_time IS NULL AND t.topic_last_post_time > $last_mark) ) $sql_extra $sql_sort", |