init
Showing
1 changed file
with
2 additions
and
1 deletions
| ... | @@ -76,10 +76,11 @@ class Perm extends CI_Controller { | ... | @@ -76,10 +76,11 @@ class Perm extends CI_Controller { |
| 76 | $item['name'] = $v->name; | 76 | $item['name'] = $v->name; |
| 77 | $item['pId'] = 0; | 77 | $item['pId'] = 0; |
| 78 | $item['open'] = true; | 78 | $item['open'] = true; |
| 79 | $arr[] = $item; | ||
| 79 | if (!$v->children || empty($v->children)) { | 80 | if (!$v->children || empty($v->children)) { |
| 80 | continue; | 81 | continue; |
| 81 | } | 82 | } |
| 82 | $arr[] = $item; | 83 | |
| 83 | foreach ($v->children as $kk => $vv) { | 84 | foreach ($v->children as $kk => $vv) { |
| 84 | $item2 = array(); | 85 | $item2 = array(); |
| 85 | $item2['id'] = $vv->id; | 86 | $item2['id'] = $vv->id; | ... | ... |
-
Please register or sign in to post a comment