mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-07-12 23:23:04 +02:00
Merge branch 'master' into develop
This commit is contained in:
@@ -441,7 +441,13 @@ define('navigator', [
|
||||
function generateUrl(index) {
|
||||
const pathname = window.location.pathname.replace(config.relative_path, '');
|
||||
const parts = pathname.split('/');
|
||||
return parts[1] + '/' + parts[2] + '/' + parts[3] + (index ? '/' + index : '');
|
||||
const newUrl = parts[1] + '/' + parts[2] + '/' + parts[3] + (index ? '/' + index : '');
|
||||
const data = {
|
||||
newUrl,
|
||||
index,
|
||||
};
|
||||
hooks.fire('action:navigator.generateUrl', data);
|
||||
return data.newUrl;
|
||||
}
|
||||
|
||||
navigator.getCount = () => count;
|
||||
|
||||
@@ -22,9 +22,9 @@ recentController.get = async function (req, res, next) {
|
||||
res.render('recent', data);
|
||||
};
|
||||
|
||||
recentController.getData = async function (req, url, sort) {
|
||||
recentController.getData = async function (req, url, sort, selectedTerm = 'alltime') {
|
||||
const page = parseInt(req.query.page, 10) || 1;
|
||||
let term = helpers.terms[req.query.term];
|
||||
let term = helpers.terms[req.query.term || selectedTerm];
|
||||
const { cid, tag } = req.query;
|
||||
const filter = req.query.filter || '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user