mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-16 01:01:41 +02:00
dont allow move to same topic
This commit is contained in:
@@ -86,6 +86,11 @@ module.exports = function(Topics) {
|
||||
if (!post || !post.tid) {
|
||||
return next(new Error('[[error:no-post]]'));
|
||||
}
|
||||
|
||||
if (parseInt(post.tid, 10) === parseInt(tid, 10)) {
|
||||
return next(new Error('[[error:cant-move-to-same-topic]]'))
|
||||
}
|
||||
|
||||
postData = post;
|
||||
postData.pid = pid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user