Don't change url when homepage is set to a category.

v1.18.x
yariplus 10 years ago
parent 3a520cdfbf
commit 12fb512d3c

@ -50,7 +50,16 @@ Controllers.home = function(req, res, next) {
} else if (route === 'popular') {
Controllers.popular.get(req, res, next);
} else {
res.redirect(route);
var match = /^category\/(\d+)\/(.*)$/.exec(route);
if (match) {
req.params.topic_index = "1";
req.params.category_id = match[1];
req.params.slug = match[2];
Controllers.categories.get(req, res, next);
} else {
res.redirect(route);
}
}
}
});

Loading…
Cancel
Save