mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-04 21:15:55 +01:00
updating privilege handling to fire two new hooks, filter:privileges.topics.get and filter:category.topics.get
This commit is contained in:
@@ -2,14 +2,16 @@
|
||||
|
||||
var async = require('async'),
|
||||
db = require('../database'),
|
||||
topics = require('../topics');
|
||||
topics = require('../topics'),
|
||||
plugins = require('../plugins');
|
||||
|
||||
module.exports = function(Categories) {
|
||||
|
||||
Categories.getCategoryTopics = function(data, callback) {
|
||||
var tids;
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
async.apply(plugins.fireHook, 'filter:category.topics.get', data),
|
||||
function(data, next) {
|
||||
Categories.getTopicIds(data.targetUid ? 'cid:' + data.cid + ':uid:' + data.targetUid + ':tids' : 'cid:' + data.cid + ':tids', data.start, data.stop, next);
|
||||
},
|
||||
function(topicIds, next) {
|
||||
|
||||
Reference in New Issue
Block a user