dont allow move to same topic

This commit is contained in:
barisusakli
2014-12-12 00:52:59 -05:00
parent 8bba811aaf
commit da4014eb71

View File

@@ -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;