This commit is contained in:
barisusakli
2014-06-10 14:24:50 -04:00
parent eb1b48092d
commit a65d612907
9 changed files with 293 additions and 219 deletions

View File

@@ -177,6 +177,16 @@ var winston = require('winston'),
});
}
PostTools.purge = function(uid, pid, callback) {
privileges.posts.canEdit(pid, uid, function(err, canEdit) {
if (err || !canEdit) {
return callback(err || new Error('[[error:no-privileges]]'));
}
posts.delete(pid, callback);
});
};
function updateTopicTimestamp(tid, callback) {
topics.getLatestUndeletedPid(tid, function(err, pid) {
if(err || !pid) {