removed move button from main post, disable moving main post, fixed
moving posts.
This commit is contained in:
barisusakli
2014-06-23 18:06:59 -04:00
parent 9af12819e3
commit bd4722665d
6 changed files with 24 additions and 20 deletions

View File

@@ -476,6 +476,17 @@ var async = require('async'),
});
};
Posts.isMain = function(pid, callback) {
Posts.getPostField(pid, 'tid', function(err, tid) {
if (err) {
return callback(err);
}
topics.getTopicField(tid, 'mainPid', function(err, mainPid) {
callback(err, parseInt(pid, 10) === parseInt(mainPid, 10));
});
});
};
Posts.updatePostVoteCount = function(pid, voteCount, callback) {
async.parallel([
function(next) {