diff --git a/application/admin/command/Crud/stubs/index.stub b/application/admin/command/Crud/stubs/index.stub index d251f661..f9ca18d2 100644 --- a/application/admin/command/Crud/stubs/index.stub +++ b/application/admin/command/Crud/stubs/index.stub @@ -1,5 +1,5 @@
- {:build_heading($heading.name, $heading.intro)} + {:build_heading()}
diff --git a/application/admin/controller/auth/Rule.php b/application/admin/controller/auth/Rule.php index 170902e6..b006bef7 100644 --- a/application/admin/controller/auth/Rule.php +++ b/application/admin/controller/auth/Rule.php @@ -107,7 +107,13 @@ class Rule extends Backend $this->code = -1; if ($ids) { - $count = $this->model->where('id', 'in', $ids)->delete(); + $delIds = []; + foreach (explode(',', $ids) as $k => $v) + { + $delIds = array_merge($delIds, Tree::instance()->getChildrenIds($v, TRUE)); + } + $delIds = array_unique($delIds); + $count = $this->model->where('id', 'in', $delIds)->delete(); if ($count) { AdminLog::record(__('Del'), $ids);