This commit is contained in:
Baris Soner Usakli
2014-01-22 23:58:21 -05:00
parent 042174290f
commit b717c74a81
2 changed files with 53 additions and 31 deletions

View File

@@ -207,18 +207,22 @@ var winston = require('winston'),
});
});
// Restore topic if it is the only post
topics.getTopicField(postData.tid, 'postcount', function(err, count) {
if (parseInt(count, 10) === 1) {
threadTools.restore(postData.tid, uid);
}
});
Feed.updateTopic(postData.tid);
Feed.updateRecent();
db.searchIndex('post', postData.content, pid);
// Restore topic if it is the only post
topics.getTopicField(postData.tid, 'postcount', function(err, count) {
if (parseInt(count, 10) === 1) {
threadTools.restore(postData.tid, uid, function(err) {
if(err) {
winston.err(err);
}
});
}
});
callback();
});
};