mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
@@ -244,7 +244,7 @@ var async = require('async'),
|
||||
if (categories[i]) {
|
||||
categories[i]['unread-class'] = (parseInt(categories[i].topic_count, 10) === 0 || (hasRead[i] && uid !== 0)) ? '' : 'unread';
|
||||
categories[i].children = results.children[i];
|
||||
categories[i].parent = results.parents[i] && !results.parents[i].disabled ? results.parents[i] : null;
|
||||
categories[i].parent = results.parents[i] || undefined;
|
||||
calculateTopicPostCount(categories[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,15 +57,17 @@ helpers.buildCategoryBreadcrumbs = function(cid, callback) {
|
||||
async.whilst(function() {
|
||||
return parseInt(cid, 10);
|
||||
}, function(next) {
|
||||
categories.getCategoryFields(cid, ['name', 'slug', 'parentCid'], function(err, data) {
|
||||
categories.getCategoryFields(cid, ['name', 'slug', 'parentCid', 'disabled'], function(err, data) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
breadcrumbs.unshift({
|
||||
text: validator.escape(data.name),
|
||||
url: nconf.get('relative_path') + '/category/' + data.slug
|
||||
});
|
||||
if (!parseInt(data.disabled, 10)) {
|
||||
breadcrumbs.unshift({
|
||||
text: validator.escape(data.name),
|
||||
url: nconf.get('relative_path') + '/category/' + data.slug
|
||||
});
|
||||
}
|
||||
|
||||
cid = data.parentCid;
|
||||
next();
|
||||
|
||||
Reference in New Issue
Block a user