上线代码修改
This commit is contained in:
@@ -116,14 +116,6 @@ class adminApi extends Controller
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
//只记录POST请求的日志
|
||||
if (request()->isPost() && config('myadmin.auto_record_log')) {
|
||||
$this_auth_rule_name = db('auth_rule')->where('name', substr(xss_clean(strip_tags(request()->url())), 0, 1500))->value('title');
|
||||
if(empty($this_auth_rule_name)){
|
||||
$this_auth_rule_name = '未知操作';
|
||||
}
|
||||
\app\admin\model\AdminLog::record($this_auth_rule_name);
|
||||
}
|
||||
$modulename = $this->request->module();
|
||||
$controllername = Loader::parseName($this->request->controller());
|
||||
$actionname = strtolower($this->request->action());
|
||||
@@ -223,7 +215,15 @@ class adminApi extends Controller
|
||||
$config = array_merge($config, Config::get("view_replace_str"));
|
||||
|
||||
Config::set('upload', array_merge(Config::get('upload'), $upload));
|
||||
|
||||
//记录日志
|
||||
//只记录POST请求的日志
|
||||
if (request()->isPost() && config('myadmin.auto_record_log')) {
|
||||
$this_auth_rule_name = db('auth_rule')->where('name', substr(xss_clean(strip_tags(request()->url())), 0, 1500))->value('title');
|
||||
if(empty($this_auth_rule_name)){
|
||||
$this_auth_rule_name = '未知操作';
|
||||
}
|
||||
\app\admin\model\AdminLog::record($this_auth_rule_name);
|
||||
}
|
||||
// 配置信息后
|
||||
Hook::listen("config_init", $config);
|
||||
//加载当前控制器语言包
|
||||
|
||||
Reference in New Issue
Block a user