From: defacer Date: Tue, 20 Jul 2004 12:39:19 +0000 (+0000) Subject: This should make individual forum posts in digests be sorted in ascending postid X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e1c6dde15007d545164b6c8430191920def6c1be;p=moodle.git This should make individual forum posts in digests be sorted in ascending postid (and thus, chronological) order. Strange thing is, it looks like being sorted as it is! --- diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 88410ffd1c..9e33b4273b 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -415,7 +415,10 @@ function forum_cron () { } $posthtml .= '

'; - foreach($discussionposts[$discussionid] as $postid) { + $postsarray = $discussionposts[$discussionid]; + sort($postsarray); + + foreach($postsarray as $postid) { if (! $post = get_record("forum_posts", "id", "$postid")) { echo "Could not find post $postid\n"; continue;