up themes, 404 non existing popular pages

This commit is contained in:
barisusakli
2015-09-16 14:51:55 -04:00
parent ade9a44b11
commit 4826883484
2 changed files with 9 additions and 5 deletions

View File

@@ -13,13 +13,17 @@ var anonCache = {}, lastUpdateTime = 0;
var terms = {
daily: 'day',
weekly: 'week',
monthly: 'month',
alltime: 'alltime'
monthly: 'month'
};
popularController.get = function(req, res, next) {
var term = terms[req.params.term] || 'alltime';
var term = terms[req.params.term];
if (!term && req.params.term) {
return next();
}
term = term || 'alltime';
var termToBreadcrumb = {
day: '[[recent:day]]',