Browse Source

修复三级目录不能转为二级目录的bug

star7th 9 years ago
parent
commit
a0d8af0159
1 changed files with 3 additions and 1 deletions
  1. 3 1
      Application/Home/Controller/CatalogController.class.php

+ 3 - 1
Application/Home/Controller/CatalogController.class.php

@@ -51,6 +51,8 @@ class CatalogController extends BaseController {
         $data['parent_cat_id'] = $parent_cat_id ;
         if ($parent_cat_id > 0 ) {
            $data['level'] = 3;
+        }else{
+            $data['level'] = 2;
         }
 
         if ($cat_id > 0 ) {
@@ -139,7 +141,7 @@ class CatalogController extends BaseController {
 
         if ($cat_id > 0 ) {
             
-            $ret = D("Catalog")->where(" cat_id = '$cat_id' ")->limit(1)->delete();
+            $ret = D("Catalog")->where(" cat_id = '$cat_id' ")->delete();
 
         }
         if ($ret) {