fix page count

This commit is contained in:
barisusakli
2014-09-25 15:53:53 -04:00
parent 1202322700
commit 97e4f13a4d

View File

@@ -120,7 +120,7 @@ topicsController.get = function(req, res, next) {
return categoriesController.notAllowed(req, res);
}
topicData.pageCount = Math.ceil(parseInt(postCount, 10) / settings.postsPerPage);
topicData.pageCount = Math.ceil((postCount - 1) / settings.postsPerPage);
topicData.currentPage = page;
if(page > 1) {