Browse Source

Error 404 for cp module

Vova Tkach 6 years ago
parent
commit
95bccb45ce
1 changed files with 6 additions and 4 deletions
  1. 6 4
      modules/modules.go

+ 6 - 4
modules/modules.go

@@ -109,10 +109,12 @@ func (this *Modules) getCurrentModule(wrap *wrapper.Wrapper, backend bool) (*Mod
 	}
 
 	// Default module
-	if mod == nil {
-		if m, ok := this.mods["index"]; ok {
-			mod = m
-			modCurr = "index"
+	if !backend || (backend && len(wrap.UrlArgs) <= 0) {
+		if mod == nil {
+			if m, ok := this.mods["index"]; ok {
+				mod = m
+				modCurr = "index"
+			}
 		}
 	}