Merge branch 'master' into develop

This commit is contained in:
Barış Soner Uşaklı
2025-09-16 19:08:14 -04:00
2 changed files with 9 additions and 3 deletions

View File

@@ -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;

View File

@@ -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 || '';