]> git.mjollnir.org Git - moodle.git/commitdiff
This should make individual forum posts in digests be sorted in ascending postid
authordefacer <defacer>
Tue, 20 Jul 2004 12:39:19 +0000 (12:39 +0000)
committerdefacer <defacer>
Tue, 20 Jul 2004 12:39:19 +0000 (12:39 +0000)
(and thus, chronological) order. Strange thing is, it looks like being sorted as it is!

mod/forum/lib.php

index 88410ffd1c498d6598e12bf109045c8efe212879..9e33b4273be14b92dd25f08281783f436ab4de2c 100644 (file)
@@ -415,7 +415,10 @@ function forum_cron () {
                     }
                     $posthtml .= '<p>';
 
-                    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;