mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 16:30:34 +01:00
fix permalinks on pagination
This commit is contained in:
@@ -105,9 +105,9 @@ topicsController.get = function (req, res, callback) {
|
|||||||
} else if (!req.query.page) {
|
} else if (!req.query.page) {
|
||||||
var index;
|
var index;
|
||||||
if (reverse) {
|
if (reverse) {
|
||||||
index = Math.max(0, postCount - (req.params.post_index || postCount));
|
index = Math.max(0, postCount - (req.params.post_index || postCount) + 2);
|
||||||
} else {
|
} else {
|
||||||
index = Math.max(0, req.params.post_index - 1) || 0;
|
index = Math.max(0, req.params.post_index) || 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentPage = Math.max(1, Math.ceil(index / settings.postsPerPage));
|
currentPage = Math.max(1, Math.ceil(index / settings.postsPerPage));
|
||||||
|
|||||||
Reference in New Issue
Block a user