Merge branch 'MDL-33487' of git://github.com/danpoltawski/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 5 Jun 2012 22:06:17 +0000 (10:06 +1200)
committerSam Hemelryk <sam@moodle.com>
Tue, 5 Jun 2012 22:06:17 +0000 (10:06 +1200)
mod/forum/lib.php

index 8ec3069..0bb2bfc 100644 (file)
@@ -6397,7 +6397,7 @@ function forum_tp_count_discussion_unread_posts($userid, $discussionid) {
            'WHERE p.discussion = ? '.
                 'AND p.modified >= ? AND r.id is NULL';
 
-    return $DB->count_records_sql($sql, array($userid, $cutoffdate, $discussionid));
+    return $DB->count_records_sql($sql, array($userid, $discussionid, $cutoffdate));
 }
 
 /**