mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
closes #1126
This commit is contained in:
@@ -18,6 +18,16 @@ topicsController.get = function(req, res, next) {
|
||||
uid = req.user ? req.user.uid : 0,
|
||||
privileges;
|
||||
|
||||
if (!req.params.slug && !res.locals.isAPI) {
|
||||
topics.getTopicField(tid, 'slug', function(err, slug) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
res.redirect('/topic/' + slug);
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
threadTools.privileges(tid, ((req.user) ? req.user.uid || 0 : 0), function(err, userPrivileges) {
|
||||
|
||||
Reference in New Issue
Block a user