Browse Source

Remove WantDB flag

Vova Tkach 5 years ago
parent
commit
22cc67b64f
1 changed files with 0 additions and 17 deletions
  1. 0 17
      engine/modules/modules.go

+ 0 - 17
engine/modules/modules.go

@@ -26,7 +26,6 @@ type MISub struct {
 
 
 type MInfo struct {
 type MInfo struct {
 	Id     string
 	Id     string
-	WantDB bool
 	Mount  string
 	Mount  string
 	Name   string
 	Name   string
 	Order  int
 	Order  int
@@ -43,7 +42,6 @@ type Module struct {
 
 
 type AInfo struct {
 type AInfo struct {
 	Id        string
 	Id        string
-	WantDB    bool
 	Mount     string
 	Mount     string
 	WantUser  bool
 	WantUser  bool
 	WantAdmin bool
 	WantAdmin bool
@@ -296,14 +294,6 @@ func (this *Modules) XXXActionFire(wrap *wrapper.Wrapper) bool {
 			}
 			}
 			if name != "" {
 			if name != "" {
 				if act, ok := this.acts[name]; ok {
 				if act, ok := this.acts[name]; ok {
-					// if act.Info.WantDB {
-					// 	err := wrap.UseDatabase()
-					// 	if err != nil {
-					// 		this.XXXActionHeaders(wrap, http.StatusNotFound)
-					// 		wrap.MsgError(err.Error())
-					// 		return true
-					// 	}
-					// }
 					if act.Info.WantUser || act.Info.WantAdmin {
 					if act.Info.WantUser || act.Info.WantAdmin {
 						if !wrap.LoadSessionUser() {
 						if !wrap.LoadSessionUser() {
 							this.XXXActionHeaders(wrap, http.StatusNotFound)
 							this.XXXActionHeaders(wrap, http.StatusNotFound)
@@ -344,13 +334,6 @@ func (this *Modules) XXXFrontEnd(wrap *wrapper.Wrapper) bool {
 	if mod != nil {
 	if mod != nil {
 		wrap.CurrModule = cm
 		wrap.CurrModule = cm
 		if mod.Front != nil {
 		if mod.Front != nil {
-			// if mod.Info.WantDB {
-			// 	err := wrap.UseDatabase()
-			// 	if err != nil {
-			// 		utils.SystemErrorPageEngine(wrap.W, err)
-			// 		return true
-			// 	}
-			// }
 			start := time.Now()
 			start := time.Now()
 			mod.Front(wrap)
 			mod.Front(wrap)
 			if !(mod.Info.Mount == "api" || (mod.Info.Mount == "shop" && len(wrap.UrlArgs) >= 3 && wrap.UrlArgs[1] == "basket")) {
 			if !(mod.Info.Mount == "api" || (mod.Info.Mount == "shop" && len(wrap.UrlArgs) >= 3 && wrap.UrlArgs[1] == "basket")) {