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