From 1ab28953605778e1479ba9e518b10e367319d648 Mon Sep 17 00:00:00 2001 From: R-J Date: Mon, 29 Jul 2013 13:14:01 +0200 Subject: [PATCH] Update class.discussionmodel.php GetUnread was not showing new discussions without any comment. Fixed that. --- applications/vanilla/models/class.discussionmodel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/vanilla/models/class.discussionmodel.php b/applications/vanilla/models/class.discussionmodel.php index 4acd709c344..c124f6e2d48 100644 --- a/applications/vanilla/models/class.discussionmodel.php +++ b/applications/vanilla/models/class.discussionmodel.php @@ -392,7 +392,8 @@ public function GetUnread($Offset = '0', $Limit = '', $Wheres = '', $AdditionalF //->Where('w.DateLastViewed', NULL) //->OrWhere('d.DateLastComment >', 'w.DateLastViewed') //->EndWhereGroup() - ->Where('d.CountComments >', 'COALESCE(w.CountComments, 0)', TRUE, FALSE); + ->Where('d.CountComments >', 'COALESCE(w.CountComments, 0)', TRUE, FALSE) + ->OrWhere('w.DateLastViewed', NULL); } else { $this->SQL ->Select('0', '', 'WatchUserID')