From 62dd056faa5e8b6cbeb30fbaa5c5138d4f9eec9c Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sat, 23 Aug 2014 21:53:16 -0400 Subject: [PATCH] tag search --- src/topics/tags.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/topics/tags.js b/src/topics/tags.js index 861a8974a6..ecca55eb2f 100644 --- a/src/topics/tags.js +++ b/src/topics/tags.js @@ -214,19 +214,8 @@ module.exports = function(Topics) { return callback(null, []); } - if (plugins.hasListeners('filter:tags.category')) { - plugins.fireHook('filter:tags.category', {tags: [], cid: data.cid}, function(err, result) { - if (data.query.length === 1) { - callback(err, result.tags); - } else { - doSearch(err, result ? result.tags : null); - } - }); - } else { - db.getSortedSetRevRange('tags:topic:count', 0, -1, doSearch); - } - function doSearch(err, tags) { + db.getSortedSetRevRange('tags:topic:count', 0, -1, function(err, tags) { if (err) { return callback(null, []); } @@ -244,7 +233,7 @@ module.exports = function(Topics) { }); callback(null, matches); - } + }); }; }; \ No newline at end of file