diff options
author | Unknown <joe2010xtmf@163.com> | 2014-05-05 19:58:13 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-05-05 19:58:13 -0400 |
commit | 6e3dba2cc559275b5287673957ec855e61b4163a (patch) | |
tree | e7188a38aad06b17663aa48b03b523ab24329c58 /modules/auth/admin.go | |
parent | bbdfe2576966210cfffc830bfbe3731bcf653b3b (diff) | |
download | gitea-6e3dba2cc559275b5287673957ec855e61b4163a.tar.gz gitea-6e3dba2cc559275b5287673957ec855e61b4163a.zip |
Clean repo code
Diffstat (limited to 'modules/auth/admin.go')
-rw-r--r-- | modules/auth/admin.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/modules/auth/admin.go b/modules/auth/admin.go index 39d2d09620..02a4dc489a 100644 --- a/modules/auth/admin.go +++ b/modules/auth/admin.go @@ -11,7 +11,6 @@ import ( "github.com/go-martini/martini" "github.com/gogits/gogs/modules/base" - "github.com/gogits/gogs/modules/log" "github.com/gogits/gogs/modules/middleware/binding" ) @@ -36,20 +35,6 @@ func (f *AdminEditUserForm) Name(field string) string { } func (f *AdminEditUserForm) Validate(errors *binding.BindingErrors, req *http.Request, context martini.Context) { - if req.Method == "GET" || errors.Count() == 0 { - return - } - data := context.Get(reflect.TypeOf(base.TmplData{})).Interface().(base.TmplData) - data["HasError"] = true - AssignForm(f, data) - - if len(errors.Overall) > 0 { - for _, err := range errors.Overall { - log.Error("AdminEditUserForm.Validate: %v", err) - } - return - } - validate(errors, data, f) } |