MDL-50109 forum: Respect chronological order of blog posts in prev/next
authorDavid Mudrák <david@moodle.com>
Thu, 13 Aug 2015 23:21:57 +0000 (01:21 +0200)
committerDavid Mudrák <david@moodle.com>
Mon, 31 Aug 2015 07:55:02 +0000 (09:55 +0200)
commit9e381efd1f744a028c46cca1700e7b86f908925e
tree9e66b77e47b7ab1dccab50035d3c6bac68299747
parent8d032f59f4479ed543eec7c55f75dffc32a7c1c3
MDL-50109 forum: Respect chronological order of blog posts in prev/next

The function forum_get_discussion_neighbours() is used to generate links
to neighbour discussions. I had to change the signature of the function
to have access to the forum's type without the need to re-read it from
the database in additional query.

The SQL query for blogs is a variant of the existing query, just using
the first post's creation time instead of the discussion's timemodified
time.
mod/forum/discuss.php
mod/forum/lib.php
mod/forum/tests/lib_test.php