框架升级及修复升级后的bug

This commit is contained in:
Dev
2026-10-16 18:13:09 +08:00
parent dafb0c96c0
commit 2d342bcbd7
537 changed files with 49836 additions and 40933 deletions
@@ -176,6 +176,7 @@ class Admin extends Backend
$this->token();
$params = $this->request->post("row/a");
if ($params) {
$params = $this->preExcludePrimaryKey($params);
Db::startTrans();
try {
if ($params['password']) {
@@ -18,21 +18,13 @@ class Adminlog extends Backend
* @var \app\admin\model\AdminLog
*/
protected $model = null;
protected $childrenGroupIds = [];
protected $childrenAdminIds = [];
public function _initialize()
{
parent::_initialize();
$this->model = model('AdminLog');
$this->childrenAdminIds = $this->auth->getChildrenAdminIds(true);
$this->childrenGroupIds = $this->auth->getChildrenGroupIds(true);
$groupName = AuthGroup::where('id', 'in', $this->childrenGroupIds)
->column('id,name');
$this->view->assign('groupdata', $groupName);
}
/**
@@ -132,6 +132,7 @@ class Group extends Backend
if ($this->request->isPost()) {
$this->token();
$params = $this->request->post("row/a", [], 'strip_tags');
$params = $this->preExcludePrimaryKey($params);
//父节点不能是非权限内节点
if (!in_array($params['pid'], $this->childrenGroupIds)) {
$this->error(__('The parent group exceeds permission limit'));
@@ -82,7 +82,6 @@ class Rule extends Backend
if ($result === false) {
$this->error($this->model->getError());
}
Cache::rm('__menu__');
$this->success();
}
$this->error();
@@ -115,6 +114,7 @@ class Rule extends Backend
$this->error(__('Can not change the parent to child'));
}
}
$params = $this->preExcludePrimaryKey($params);
//这里需要针对name做唯一验证
$ruleValidate = \think\Loader::validate('AuthRule');
$ruleValidate->rule([
@@ -124,7 +124,6 @@ class Rule extends Backend
if ($result === false) {
$this->error($row->getError());
}
Cache::rm('__menu__');
$this->success();
}
$this->error();