mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
closes #2871
This commit is contained in:
@@ -249,6 +249,11 @@ categoriesController.get = function(req, res, next) {
|
||||
categories.getCategoryById(payload, next);
|
||||
},
|
||||
function(categoryData, next) {
|
||||
if (categoryData.link) {
|
||||
db.incrObjectField('category:' + categoryData.cid, 'timesClicked');
|
||||
return res.redirect(categoryData.link);
|
||||
}
|
||||
|
||||
var breadcrumbs = [
|
||||
{
|
||||
text: categoryData.name,
|
||||
@@ -264,10 +269,6 @@ categoriesController.get = function(req, res, next) {
|
||||
});
|
||||
},
|
||||
function(categoryData, next) {
|
||||
if (categoryData.link) {
|
||||
return res.redirect(categoryData.link);
|
||||
}
|
||||
|
||||
categories.getRecentTopicReplies(categoryData.children, uid, function(err) {
|
||||
next(err, categoryData);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user