解决更高数据库版本的情况下,在获取菜单时group字段数据库查询错误
This commit is contained in:
@@ -152,7 +152,7 @@ class Admin extends Base {
|
|||||||
$map['pid'] = $pid;
|
$map['pid'] = $pid;
|
||||||
$map['hide'] = 0;
|
$map['hide'] = 0;
|
||||||
$map['type'] = 'admin';
|
$map['type'] = 'admin';
|
||||||
$row = db('menu')->field('id,title,url,icon,group,pid,"" as style')->where($map)->order('sort asc')->select();
|
$row = db('menu')->field("id,title,url,icon,`group`,pid,'' as style")->where($map)->order('sort asc')->select();
|
||||||
foreach ($row as $key => $value) {
|
foreach ($row as $key => $value) {
|
||||||
if (IS_ROOT || $this->checkRule($value['url'], 2, null)) {
|
if (IS_ROOT || $this->checkRule($value['url'], 2, null)) {
|
||||||
if ($controller == $value['url']) {
|
if ($controller == $value['url']) {
|
||||||
|
|||||||
Reference in New Issue
Block a user