Merge branch 'master' into develop

This commit is contained in:
Julian Lam
2017-01-13 15:01:34 -05:00
5 changed files with 11 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ module.exports = function (Categories) {
topics[i].index = data.start + i;
}
plugins.fireHook('filter:category.topics.get', {topics: topics, uid: data.uid}, next);
plugins.fireHook('filter:category.topics.get', {cid: data.cid, topics: topics, uid: data.uid}, next);
},
function (results, next) {
next(null, {topics: results.topics, nextStart: data.stop + 1});

View File

@@ -15,7 +15,7 @@ module.exports = function (middleware) {
middleware.checkGlobalPrivacySettings = function (req, res, next) {
if (!req.user && !!parseInt(meta.config.privateUserInfo, 10)) {
return controllers.helpers.notAllowed(req, res);
return middleware.authenticate(req, res, next);
}
next();

View File

@@ -272,7 +272,7 @@ module.exports = function (Topics) {
db.sortedSetsRemove([
'cid:' + topicData.cid + ':tids',
'cid:' + topicData.cid + ':tids:pinned',
'cid:' + topicData.cid + ':tids:posts'
'cid:' + topicData.cid + ':tids:posts' // post count
], tid, next);
},
function (next) {