mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
closes #3447
recursively get all children calculate topic/post count from children new sorted set `cid:<id>:children` fix search query params
This commit is contained in:
@@ -417,11 +417,14 @@ function getChildrenCids(cids, uid, callback) {
|
||||
}
|
||||
|
||||
var childrenCids = [];
|
||||
var allCategories = [];
|
||||
|
||||
childrenCategories.forEach(function(childrens) {
|
||||
childrenCids = childrenCids.concat(childrens.map(function(category) {
|
||||
return category && category.cid;
|
||||
}));
|
||||
});
|
||||
categories.flattenCategories(allCategories, childrens);
|
||||
childrenCids = childrenCids.concat(allCategories.map(function(category) {
|
||||
return category && category.cid;
|
||||
}));
|
||||
});
|
||||
|
||||
callback(null, childrenCids);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user