Merge branch 'MDL-35788-master' of git://github.com/andrewnicols/moodle
authorJun Pataleta <jun@moodle.com>
Thu, 4 Oct 2018 04:45:09 +0000 (12:45 +0800)
committerJun Pataleta <jun@moodle.com>
Thu, 4 Oct 2018 04:45:09 +0000 (12:45 +0800)
mod/forum/lib.php

index 4101f15..0d1bb37 100644 (file)
@@ -2659,7 +2659,7 @@ function forum_get_discussions($cm, $forumsort="", $fullpost=true, $unused=-1, $
         $forumsort = forum_get_default_sort_order();
     }
     if (empty($fullpost)) {
-        $postdata = "p.id,p.subject,p.modified,p.discussion,p.userid";
+        $postdata = "p.id, p.subject, p.modified, p.discussion, p.userid, p.created";
     } else {
         $postdata = "p.*";
     }
@@ -2680,7 +2680,7 @@ function forum_get_discussions($cm, $forumsort="", $fullpost=true, $unused=-1, $
     }
 
     $allnames = get_all_user_name_fields(true, 'u');
-    $sql = "SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid, d.timestart, d.timeend, d.pinned, p.created,
+    $sql = "SELECT $postdata, d.name, d.timemodified, d.usermodified, d.groupid, d.timestart, d.timeend, d.pinned,
                    $allnames, u.email, u.picture, u.imagealt $umfields
               FROM {forum_discussions} d
                    JOIN {forum_posts} p ON p.discussion = d.id