moved topic locked check to topic.reply

v1.18.x
Baris Soner Usakli 11 years ago
parent 77f5d6ff7d
commit fb691b23b4

@ -37,13 +37,6 @@ var db = require('./database'),
async.waterfall([
function(next) {
topics.isLocked(tid, next);
},
function(locked, next) {
if(locked) {
return next(new Error('topic-locked'));
}
db.incrObjectField('global', 'nextPid', next);
},
function(pid, next) {

@ -171,6 +171,14 @@ var async = require('async'),
if (!topicExists) {
return next(new Error('topic doesn\'t exist'));
}
Topics.isLocked(tid, next);
},
function(locked, next) {
if (locked) {
return next(new Error('topic-locked'));
}
threadTools.privileges(tid, uid, next);
},
function(privilegesData, next) {

Loading…
Cancel
Save