Node.js based forum software built for the modern web
closes #1964
barisusaklid91fa5747d64
diff --git a/public/language/en_GB/recent.json b/public/language/en_GB/recent.jsonindex 32b31d2666..ff6400f27a 100644--- a/public/language/en_GB/recent.json+++ b/public/language/en_GB/recent.json@@ -4,5 +4,6 @@"week": "Week","month": "Month","year": "Year",+ "alltime": "All Time","no_recent_topics": "There are no recent topics."}\ No newline at end of filediff --git a/src/controllers/categories.js b/src/controllers/categories.jsindex 506747f741..a0fb8db212 100644--- a/src/controllers/categories.js+++ b/src/controllers/categories.js@@ -17,7 +17,7 @@ categoriesController.recent = function(req, res, next) {return next(err);}- data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false;+ data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;res.render('recent', data);});@@ -33,7 +33,7 @@ categoriesController.popular = function(req, res, next) {return next(err);}- data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] === '1' ? true : false;+ data['feeds:disableRSS'] = parseInt(meta.config['feeds:disableRSS'], 10) === 1;res.render('popular', {topics: data});});diff --git a/src/topics/popular.js b/src/topics/popular.jsindex dd9a8d4240..895849eae8 100644--- a/src/topics/popular.js+++ b/src/topics/popular.js@@ -16,6 +16,10 @@ module.exports = function(Topics) {yearly: 'year'};+ if (term === 'alltime') {+ return getAllTimePopular(uid, callback);+ }+var since = terms[term] || 'day';async.waterfall([@@ -45,6 +49,12 @@ module.exports = function(Topics) {], callback);};+ function getAllTimePopular(uid, callback) {+ Topics.getTopicsFromSet(uid, 'topics:posts', 0, 19, function(err, data) {+ callback(err, data ? data.topics : null);+ });+ }+function getTopics(tids, uid, callback) {var keys = tids.map(function(tid) {return 'topic:' + tid;