This commit is contained in:
Barış Soner Uşaklı
2015-04-23 14:37:27 -04:00
parent f44e850fa0
commit 21b634e03f
2 changed files with 4 additions and 3 deletions

View File

@@ -89,9 +89,9 @@ topicsController.get = function(req, res, next) {
}
if (!settings.usePagination) {
if (reverse) {
postIndex = Math.max(0, postCount - (req.params.post_index || postCount) - (settings.postsPerPage - 1));
postIndex = Math.max(0, postCount - (req.params.post_index || postCount) - (settings.postsPerPage / 2));
} else {
postIndex = Math.max(0, (req.params.post_index || 1) - (settings.postsPerPage + 1));
postIndex = Math.max(0, (req.params.post_index || 1) - (settings.postsPerPage / 2));
}
} else if (!req.query.page) {
var index = 0;