Browse Source

Don't allow delete root category

Vova Tkach 6 years ago
parent
commit
0d0b424700
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/module_blog_categories.go

+ 1 - 1
modules/module_blog_categories.go

@@ -221,7 +221,7 @@ func (this *Modules) RegisterAction_BlogCategoriesDelete() *Action {
 	}, func(wrap *wrapper.Wrapper) {
 		pf_id := wrap.R.FormValue("id")
 
-		if !utils.IsNumeric(pf_id) {
+		if !utils.IsNumeric(pf_id) || utils.StrToInt(pf_id) <= 1 {
 			wrap.MsgError(`Inner system error`)
 			return
 		}