Merge pull request #2119 from Fusselwurm/patch-1

default for missing post_index parameter when topic pagination is used
v1.18.x
Julian Lam 11 years ago
commit abdcb32ad2

@ -72,7 +72,7 @@ topicsController.get = function(req, res, next) {
postIndex = Math.max((req.params.post_index || 1) - (settings.postsPerPage + 1), 0);
}
} else if (!req.query.page) {
var index = Math.max(parseInt(req.params.post_index, 10), 0);
var index = Math.max(parseInt(req.params.post_index, 10), 0) || 0;
page = Math.ceil((index + 1) / settings.postsPerPage);
}

Loading…
Cancel
Save