mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Clean repo code
This commit is contained in:
		@@ -183,20 +183,6 @@ func (f *InstallForm) Name(field string) string {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (f *InstallForm) 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("InstallForm.Validate: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	validate(errors, data, f)
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user