优化日志

master
chenzhi 4 years ago
parent 5644570c1e
commit 7e1d2fb879

@ -2583,7 +2583,7 @@ function getCompanyBlongOther($id = -1)
*/
function addOperationLog($options)
{
$checkarr = ['op_type','url','key'];
$checkarr = ['op_type','key'];
foreach ($checkarr as $v) {
if(!array_key_exists($v,$options)){
return false;
@ -2592,6 +2592,9 @@ function addOperationLog($options)
if(!array_key_exists("op_name",$options)){
$options['op_name'] = ($options['op_type'] == 1 ? "编辑" : ($options['op_type'] == 2 ? "删除" :($options['op_type'] == 3 ? "导出" :"新增")));
}
if(!array_key_exists("url",$options)){
$options['url'] = MODULE_NAME."/".CONTROLLER_NAME."/".ACTION_NAME;
}
//获取ip
$addarray = [
"op_ip"=>$_SERVER['REMOTE_ADDR'],

Loading…
Cancel
Save