From fd558085eeeaffcca5f21d03e0c17621303e024f Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Fri, 7 Apr 2023 17:03:29 +0800 Subject: [PATCH] * Modify module root data. --- module/tree/model.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/module/tree/model.php b/module/tree/model.php index 7f3e2b6d48..d54c38d1c6 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -1835,7 +1835,12 @@ class treeModel extends model $changes = common::createChanges($self, $module); if(!isset($_POST['branch'])) $module->branch = $self->branch; - if($self and $module->parent) $self->parent = $module->parent; + if($self) + { + $self->parent = $module->parent; + if($self->root) $module->root = $self->root; + } + $repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $module->branch)); if($repeatName) {