MDL-33487 - mod_forum: incorrect param ordering
authorDan Poltawski <dan@moodle.com>
Fri, 1 Jun 2012 15:28:47 +0000 (23:28 +0800)
committerDan Poltawski <dan@moodle.com>
Fri, 1 Jun 2012 15:35:26 +0000 (23:35 +0800)
Thanks to Garret Gengler for spotting it.

mod/forum/lib.php

index 9bcc409..0f55205 100644 (file)
@@ -6340,7 +6340,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));
 }
 
 /**