Node.js based forum software built for the modern web
allow multiple tags
barisusaklic0a8fd739560
diff --git a/src/categories/topics.js b/src/categories/topics.jsindex ea75ab16a5..1459bca531 100644--- a/src/categories/topics.js+++ b/src/categories/topics.js@@ -125,7 +125,7 @@ module.exports = function (Categories) {if (parseInt(pinned, 10) === 1) {return setImmediate(next);}-+async.parallel([function (next) {db.sortedSetAdd('cid:' + cid + ':tids', postData.timestamp, postData.tid, next);@@ -135,11 +135,11 @@ module.exports = function (Categories) {}], function (err) {next(err);- });+ });},function (next) {Categories.updateRecentTid(cid, postData.tid, next);- }+ }], callback);};diff --git a/src/controllers/category.js b/src/controllers/category.jsindex 2a660ee63c..bb9efe1cb5 100644--- a/src/controllers/category.js+++ b/src/controllers/category.js@@ -111,7 +111,13 @@ categoryController.get = function (req, res, callback) {}if (req.query.tag) {- payload.set = [payload.set, 'tag:' + req.query.tag + ':topics'];+ if (Array.isArray(req.query.tag)) {+ payload.set = [payload.set].concat(req.query.tag.map(function (tag) {+ return 'tag:' + tag + ':topics';+ }));+ } else {+ payload.set = [payload.set, 'tag:' + req.query.tag + ':topics'];+ }}categories.getCategoryById(payload, next);}