v1.18.x
barisusakli 10 years ago
parent e9d9e14eb4
commit 6c58bd9520

@ -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);
});

Loading…
Cancel
Save