mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
fix: make sort work with world filters
This commit is contained in:
@@ -7,7 +7,7 @@ define('forum/world', ['topicList', 'sort', 'hooks', 'alerts', 'api'], function
|
|||||||
app.enterRoom('world');
|
app.enterRoom('world');
|
||||||
topicList.init('world');
|
topicList.init('world');
|
||||||
|
|
||||||
sort.handleSort('categoryTopicSort', 'world');
|
sort.handleSort('categoryTopicSort', 'world' + (ajaxify.data.filter ? '/' + ajaxify.data.filter : ''));
|
||||||
|
|
||||||
handleIgnoreWatch(-1);
|
handleIgnoreWatch(-1);
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,8 @@ controller.list = async function (req, res) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data.filter = req.params.filter || undefined;
|
||||||
|
|
||||||
const pageCount = Math.max(1, Math.ceil(data.topicCount / topicsPerPage));
|
const pageCount = Math.max(1, Math.ceil(data.topicCount / topicsPerPage));
|
||||||
data.pagination = pagination.create(page, pageCount, req.query);
|
data.pagination = pagination.create(page, pageCount, req.query);
|
||||||
helpers.addLinkTags({
|
helpers.addLinkTags({
|
||||||
|
|||||||
Reference in New Issue
Block a user