Skip to content

Node.js based forum software built for the modern web

closes #3063

barisusakli37a7ac5196c4
diff --git a/src/pagination.js b/src/pagination.js
index f8744fbdfc..58aac68f8f 100644
--- a/src/pagination.js
+++ b/src/pagination.js
@@ -44,12 +44,11 @@ pagination.create = function(currentPage, pageCount, queryObj) {
}
}
- var data = {
- prev: {page: previous, active: currentPage > 1},
- next: {page: next, active: currentPage < pageCount},
- rel: [],
- pages: pages
- };
+ var data = {rel: [], pages: pages};
+ queryObj.page = previous;
+ data.prev = {page: previous, active: currentPage > 1, qs: qs.stringify(queryObj)};
+ queryObj.page = next;
+ data.next = {page: next, active: currentPage < pageCount, qs: qs.stringify(queryObj)};
if (currentPage < pageCount) {
data.rel.push({