From a327627f850f3855a39604855316c30cbd3f69fc Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 1 Apr 2021 15:50:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=A1=8C=E4=B8=BA=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/ActionController.class.php | 6 +++--- Application/Admin/Controller/ExportController.class.php | 2 +- Application/Common/Common/function.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/ActionController.class.php b/Application/Admin/Controller/ActionController.class.php index 15c013f6b..0df449eff 100644 --- a/Application/Admin/Controller/ActionController.class.php +++ b/Application/Admin/Controller/ActionController.class.php @@ -48,7 +48,7 @@ class ActionController extends AdminController { public function edit($id = 0){ empty($id) && $this->error('参数错误!'); - $info = M('ActionLog')->field(true)->find($id); + $info = SM('ActionLog')->field(true)->find($id); $this->assign('info', $info); $this->meta_title = '查看行为日志'; @@ -73,7 +73,7 @@ class ActionController extends AdminController { }elseif (is_numeric($ids)){ $map['id'] = $ids; } - $res = M('ActionLog')->where($map)->delete(); + $res = SM('ActionLog')->where($map)->delete(); \Think\Log::actionLog("Action/remove",'Action',1); if($res !== false){ $this->success('删除成功!'); @@ -86,7 +86,7 @@ class ActionController extends AdminController { * 清空日志 */ public function clear(){ - $res = M('ActionLog')->where('1=1')->delete(); + $res = SM('ActionLog')->where('1=1')->delete(); \Think\Log::actionLog("Action/clear",'Action',1); if($res !== false){ $this->success('日志清空成功!'); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index f293def63..6a606f75b 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -7821,7 +7821,7 @@ class ExportController extends Controller $xlsName = $_REQUEST['xlsname']; - $model = M('ActionLog'); + $model = SM('ActionLog'); $xlsCell = array( array('id','编号'), diff --git a/Application/Common/Common/function.php b/Application/Common/Common/function.php index d100b7532..2567e25e8 100644 --- a/Application/Common/Common/function.php +++ b/Application/Common/Common/function.php @@ -508,7 +508,7 @@ function get_nickname($uid = 0) if (isset($list[$key])) { //已缓存,直接使用 $name = $list[$key]; } else { //调用接口获取用户信息 - $info = M('Member')->field('nickname')->find($uid); + $info = SM('Member')->field('nickname')->find($uid); if ($info !== false && $info['nickname']) { $nickname = $info['nickname']; $name = $list[$key] = $nickname;