modxcms/Discuss — pull request #6 by eldanilo (2013-02-13 16:46:08+00:00)
Title: Fixed miscalculation for the last post's page

Since the replies-count doesn't include the initial post(?) there would be a miscalculation when there are exactly the same amount of posts like in the 'discuss.post_per_page'-setting for a thread.

For example when 'discuss.post_per_page' is 10 and there are 10 replies (plus the initial post = 11 posts), you would expect that the 10th reply (11th post) would be one the second page.

However, the if-condition still skips and calcLastPostPage() returns 1 instead of 2.