Browse Source

修复bug

weicky 4 năm trước cách đây
mục cha
commit
0ac74b2823

+ 1 - 1
src/cnphper.com/redisdog/http_log_autoprocess.go

@@ -58,7 +58,7 @@ func log_autoprocess_list(resp http.ResponseWriter, req *http.Request) {
 	req.ParseForm()
 	redisId, size, page, desc := 0, 50, 1, true
 	if redisIdStr := req.Form.Get("redis_id"); redisIdStr != "" {
-		if redisId, _ = strconv.Atoi(redisIdStr); redisId <= 1 {
+		if redisId, _ = strconv.Atoi(redisIdStr); redisId < 1 {
 			redisId = 0
 		}
 	}

+ 1 - 1
src/cnphper.com/redisdog/http_log_monitor.go

@@ -58,7 +58,7 @@ func log_monitor_list(resp http.ResponseWriter, req *http.Request) {
 	req.ParseForm()
 	redisId, size, page, desc := 0, 50, 1, true
 	if redisIdStr := req.Form.Get("redis_id"); redisIdStr != "" {
-		if redisId, _ = strconv.Atoi(redisIdStr); redisId <= 1 {
+		if redisId, _ = strconv.Atoi(redisIdStr); redisId < 1 {
 			redisId = 0
 		}
 	}

+ 1 - 1
src/cnphper.com/redisdog/http_log_warn.go

@@ -58,7 +58,7 @@ func log_warn_list(resp http.ResponseWriter, req *http.Request) {
 	req.ParseForm()
 	redisId, size, page, desc := 0, 50, 1, true
 	if redisIdStr := req.Form.Get("redis_id"); redisIdStr != "" {
-		if redisId, _ = strconv.Atoi(redisIdStr); redisId <= 1 {
+		if redisId, _ = strconv.Atoi(redisIdStr); redisId < 1 {
 			redisId = 0
 		}
 	}

+ 1 - 1
src/cnphper.com/redisdog/http_syscfg_misc.go

@@ -118,7 +118,7 @@ func syscfg_misc_set(resp http.ResponseWriter, req *http.Request) {
 	if _, err := mdl.Set("log_kept_days", logKeptDaysStr); err != nil {
 		resp.Write(ERROR_RET(9, "操作失败(log_kept_days)"))
 	}
-	SYSLOG("WARN", fmt.Sprintf("管理员#%d %s %s修改了其它配置", sess.Account.Id, sess.Account.Account, sess.Account.Account))
+	SYSLOG("WARN", fmt.Sprintf("管理员#%d %s %s修改了其它配置", sess.Account.Id, sess.Account.Name, sess.Account.Account))
 	//更新配置缓存
 	err := SysCfg.Load()
 	if err != nil {

+ 1 - 1
src/cnphper.com/redisdog/http_syscfg_warn.go

@@ -132,7 +132,7 @@ func syscfg_warn_set(resp http.ResponseWriter, req *http.Request) {
 		ret, _ := json.Marshal(ErrorRet{Errno: 6, Error: "操作失败(sender)"})
 		resp.Write(ret)
 	}
-	SYSLOG("WARN", fmt.Sprintf("管理员#%d %s %s修改了SMTP配置", sess.Account.Id, sess.Account.Account, sess.Account.Account))
+	SYSLOG("WARN", fmt.Sprintf("管理员#%d %s %s修改了SMTP配置", sess.Account.Id, sess.Account.Name, sess.Account.Account))
 	//更新配置缓存
 	err := SysCfg.Load()
 	if err != nil {