|
|
@ -402,9 +402,10 @@ var db = require('./database'),
|
|
|
|
Categories.getCategoriesData(cids, next);
|
|
|
|
Categories.getCategoriesData(cids, next);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function (categories, next) {
|
|
|
|
function (categories, next) {
|
|
|
|
|
|
|
|
// Filter categories to isolate children, and remove disabled categories
|
|
|
|
async.map(cids, function(cid, next) {
|
|
|
|
async.map(cids, function(cid, next) {
|
|
|
|
next(null, categories.filter(function(category) {
|
|
|
|
next(null, categories.filter(function(category) {
|
|
|
|
return parseInt(category.parentCid, 10) === parseInt(cid, 10);
|
|
|
|
return parseInt(category.parentCid, 10) === parseInt(cid, 10) && !category.disabled;
|
|
|
|
}));
|
|
|
|
}));
|
|
|
|
}, next);
|
|
|
|
}, next);
|
|
|
|
}
|
|
|
|
}
|
|
|
|