aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 24dd58c116..092a5d5d86 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -1703,8 +1703,8 @@ function get_unread_topics($user_id = false, $sql_extra = '', $sql_sort = '', $s
'WHERE' => "
(
- (tt.mark_time AND t.topic_last_post_time > tt.mark_time) OR
- (tt.mark_time IS NULL AND ft.mark_time AND t.topic_last_post_time > ft.mark_time) OR
+ (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