This commit is contained in:
barisusakli
2014-05-27 14:53:47 -04:00
parent 667a78902e
commit eb0a06b777
3 changed files with 24 additions and 7 deletions

View File

@@ -146,7 +146,7 @@ var winston = require('winston'),
db.incrObjectFieldBy('global', 'postCount', isDelete ? -1 : 1);
posts.getPostFields(pid, ['tid', 'uid', 'content'], function(err, postData) {
posts.getPostFields(pid, ['pid', 'tid', 'uid', 'content'], function(err, postData) {
if (err) {
return callback(err);
}
@@ -170,7 +170,16 @@ var winston = require('winston'),
function(next) {
addOrRemoveFromCategoryRecentPosts(pid, postData.tid, isDelete, next);
}
], callback);
], function(err) {
if (!isDelete) {
PostTools.parse(postData.content, function(err, parsed) {
postData.content = parsed;
callback(err, postData);
});
return;
}
callback(err, postData);
});
});
});
});