From b259c3d42299834c86dcdb851a0694abc6aa7004 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 11 Mar 2014 15:48:29 -0400 Subject: [PATCH] categoryData should return better topics (non-anon uid passed in now) --- src/controllers/categories.js | 2 +- src/topics.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/categories.js b/src/controllers/categories.js index 8380c51fff..5d186b37a1 100644 --- a/src/controllers/categories.js +++ b/src/controllers/categories.js @@ -88,7 +88,7 @@ categoriesController.get = function(req, res, next) { var start = (page - 1) * settings.topicsPerPage, end = start + settings.topicsPerPage - 1; - categories.getCategoryById(cid, start, end, 0, function (err, categoryData) { + categories.getCategoryById(cid, start, end, uid, function (err, categoryData) { if (categoryData) { if (parseInt(categoryData.disabled, 10) === 1) { return next(new Error('Category disabled'), null); diff --git a/src/topics.js b/src/topics.js index f4c12f4414..bedd5305a8 100644 --- a/src/topics.js +++ b/src/topics.js @@ -687,7 +687,6 @@ var async = require('async'), }; Topics.getTopicsByTids = function(tids, uid, callback) { - if (!Array.isArray(tids) || tids.length === 0) { return callback(null, []); }