diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index b872ae27c..203ffbb1f 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -2204,7 +2204,8 @@ function a_array_unique($array){ * op_type=>操作类型 1:编辑 2:删除 3:下载, * op_name=>操作说明 例如:编辑,删除,锁定等, * url=>需要跳转的url 添加去列表加唯一id,编辑直接去编辑页面,下载可以重新下载(新开页面), - * key=>关键词:用户的账号,游戏的名词等 + * key=>关键词:用户的账号,游戏的名词等, + * menu=>非必须,菜单目录,不存在的话按控制器寻找 * ) */ function addOperationLog($options) @@ -2229,18 +2230,24 @@ function a_array_unique($array){ 'key'=>$options['key'], 'create_time'=>time() ]; - //获取菜单名词 - $act = CONTROLLER_NAME.'/'.ACTION_NAME; - $arr = []; - $menuname = D("menu")->field('title,pid,group')->where("url = '{$act}'")->find(); - if($menuname){ - $arr[] = $menuname['title']; - if(!empty($menuname['group'])){ - $arr[] = $menuname['group']; + //获取菜单名称 + if(!array_key_exists("menu",$options)){ + $act = CONTROLLER_NAME.'/'.ACTION_NAME; + $arr = []; + $menuname = D("menu")->field('title,pid,group')->where("url = '{$act}'")->find(); + if($menuname){ + $arr[] = $menuname['title']; + if(!empty($menuname['group'])){ + $arr[] = $menuname['group']; + } + getLink($menuname['pid'],$arr); } - getLink($menuname['pid'],$arr); + $addarray['menu'] = implode ( "-",array_reverse($arr)); + }else{ + $addarray['menu'] = $options['menu']; } - $addarray['menu'] = implode ( "-",array_reverse($arr)); + + M("OperationLog","tab_")->add($addarray); } diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 893eaa0b7..8a29827ac 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -210,7 +210,7 @@ class MemberController extends ThinkController unset($_GET['export']); addOperationLog(array( "op_type"=>3, - "key"=>date("YmdHis",time()), + "key"=>getNowDate(), "url"=>U("Member/user_info",$_GET), )); data2csv($data,"玩家_玩家列表",$field);