mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-31 19:15:58 +01:00
closes #1725
removed move button from main post, disable moving main post, fixed moving posts.
This commit is contained in:
11
src/posts.js
11
src/posts.js
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user