|
|
|
@ -65,8 +65,6 @@ var winston = require('winston'),
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
db.decrObjectField('global', 'topicCount');
|
|
|
|
|
|
|
|
|
|
ThreadTools.lock(tid);
|
|
|
|
|
|
|
|
|
|
Plugins.fireHook('action:topic.delete', tid);
|
|
|
|
@ -101,10 +99,10 @@ var winston = require('winston'),
|
|
|
|
|
return callback(err);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
db.incrObjectField('global', 'topicCount');
|
|
|
|
|
|
|
|
|
|
ThreadTools.unlock(tid);
|
|
|
|
|
|
|
|
|
|
Plugins.fireHook('action:topic.restore', tid);
|
|
|
|
|
|
|
|
|
|
events.logTopicRestore(uid, tid);
|
|
|
|
|
|
|
|
|
|
websockets.emitTopicPostStats();
|
|
|
|
@ -113,8 +111,6 @@ var winston = require('winston'),
|
|
|
|
|
tid: tid
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
Plugins.fireHook('action:topic.restore', tid);
|
|
|
|
|
|
|
|
|
|
callback(null, {
|
|
|
|
|
tid:tid
|
|
|
|
|
});
|
|
|
|
@ -134,7 +130,7 @@ var winston = require('winston'),
|
|
|
|
|
tid: tid
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ThreadTools.unlock = function(tid, uid, callback) {
|
|
|
|
|
topics.setTopicField(tid, 'locked', 0);
|
|
|
|
|