From d05ef6ddbc6c372806d32d5daa4f28d013becb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Thu, 19 Mar 2015 13:28:07 -0400 Subject: [PATCH] closes #2822 --- src/controllers/search.js | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/controllers/search.js b/src/controllers/search.js index 7ed16d8bb8..775d430783 100644 --- a/src/controllers/search.js +++ b/src/controllers/search.js @@ -23,26 +23,6 @@ searchController.search = function(req, res, next) { return next(err); } - if (!req.params.term) { - var results = { - time: 0, - search_query: '', - posts: [], - users: [], - tags: [], - categories: categories, - breadcrumbs: breadcrumbs, - expandSearch: true - }; - plugins.fireHook('filter:search.build', {data: {}, results: results}, function(err, data) { - if (err) { - return next(err); - } - res.render('search', data.results); - }); - return; - } - req.params.term = validator.escape(req.params.term); var page = Math.max(1, parseInt(req.query.page, 10)) || 1; if (req.query.categories && !Array.isArray(req.query.categories)) { @@ -77,7 +57,7 @@ searchController.search = function(req, res, next) { results.breadcrumbs = breadcrumbs; results.categories = categories; results.expandSearch = false; - + plugins.fireHook('filter:search.build', {data: data, results: results}, function(err, data) { if (err) { return next(err);