作者 Karson

修复删除父规则节点时未删除子节点的BUG

修复CRUD默认index视图的错误
<div class="panel panel-default panel-intro">
{:build_heading($heading.name, $heading.intro)}
{:build_heading()}
<div class="panel-body">
<div id="myTabContent" class="tab-content">
... ...
... ... @@ -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);
... ...