|
@@ -266,8 +266,8 @@ class Group extends Apic
|
|
|
$this->loadlang('auth/group');
|
|
|
|
|
|
$model = model('AuthGroup');
|
|
|
- $id = $this->request->post("id");
|
|
|
- $pid = $this->request->post("pid");
|
|
|
+ $id = input('id');
|
|
|
+ $pid = input('pid');
|
|
|
$parentGroupModel = $model->get($pid);
|
|
|
$currentGroupModel = null;
|
|
|
if ($id) {
|
|
@@ -325,7 +325,7 @@ class Group extends Apic
|
|
|
$state = array('selected' => in_array($v['id'], $currentRuleIds) && !in_array($v['id'], $hasChildrens));
|
|
|
$nodeList[] = array('id' => $v['id'], 'parent' => $v['pid'] ? $v['pid'] : '#', 'text' => __($v['title']), 'type' => 'menu', 'state' => $state);
|
|
|
}
|
|
|
- $this->success('', null, $nodeList);
|
|
|
+ $this->success(1, $nodeList);
|
|
|
} else {
|
|
|
$this->error(__('Can not change the parent to child'));
|
|
|
}
|