mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-11 00:15:46 +01:00
closes #3614
This commit is contained in:
@@ -68,6 +68,9 @@ module.exports = function(Categories) {
|
||||
}
|
||||
|
||||
function updateParent(cid, newParent, callback) {
|
||||
if (parseInt(cid, 10) === parseInt(newParent, 10)) {
|
||||
return callback(new Error('[[error:cant-set-self-as-parent]]'));
|
||||
}
|
||||
Categories.getCategoryField(cid, 'parentCid', function(err, oldParent) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
|
||||
Reference in New Issue
Block a user