|
|
@ -137,15 +137,18 @@ module.exports = function (Topics) {
|
|
|
|
function (next) {
|
|
|
|
function (next) {
|
|
|
|
reduceCounters(tid, next);
|
|
|
|
reduceCounters(tid, next);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
], next);
|
|
|
|
], function (err) {
|
|
|
|
}
|
|
|
|
next(err);
|
|
|
|
], function (err) {
|
|
|
|
});
|
|
|
|
if (err) {
|
|
|
|
},
|
|
|
|
return callback(err);
|
|
|
|
function (next) {
|
|
|
|
|
|
|
|
Topics.getTopicData(tid, next);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
function (topicData, next) {
|
|
|
|
|
|
|
|
plugins.fireHook('action:topic.purge', {topic: topicData, uid: uid});
|
|
|
|
|
|
|
|
db.delete('topic:' + tid, next);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
plugins.fireHook('action:topic.purge', tid);
|
|
|
|
], callback);
|
|
|
|
db.delete('topic:' + tid, callback);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function deleteFromFollowersIgnorers(tid, callback) {
|
|
|
|
function deleteFromFollowersIgnorers(tid, callback) {
|
|
|
|