Code

Updated category creation
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 13:29:02 +0000 (13:29 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 14 Nov 2005 13:29:02 +0000 (13:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1941 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_xmlParse.inc

index 42bfc3c6994e179645c542a2b884b294b8cfc6f0..68c7d2408dd7572250a573bdd4564e5d1e881efc 100644 (file)
@@ -65,6 +65,9 @@ class xmlParse  {
                foreach($vals as $ele){
                        if($ele['tag'] =="INPUT") continue;
                        if($ele['tag'] =="INCLUDE") continue;
+
+                       if(!in_array($ele['tag'],array("MENU","CATEGORY","DIRECTORY"))) continue;
+
                        if($ele['type'] == "open"){
                                $tag = $ele['tag'].$i;
                
@@ -83,7 +86,7 @@ class xmlParse  {
                                if($ele['tag'] == "MENU")
                                $dir ="";
                        }
-                       if($ele['tag'] == "CATEGORY"){
+                       if(($ele['tag'] == "CATEGORY")&&(!empty($ele['value']))&&(isset($ele['value']))){
                                $current[$dir]['name'] = $ele['value'];
                        }
                        if(isset($current['type'])){
@@ -91,14 +94,13 @@ class xmlParse  {
                        }
                        if($ele['tag'] == "DIRECTORY"){
                                $dir .= preg_replace("/\.directory/","",$ele['value'])."/";
-//                             $path= $ele['value'];
-//                             $current[$dir]['path'] = $path;
                        }
-                       if($ele['tag'] == "CATEGORY"){
+                       if(($ele['tag'] == "CATEGORY")&&(!empty($ele['value']))&&(isset($ele['value']))){
                                $current[$dir] = $ele['value'];
                        }
                        $curback = $current;    
                }
+               print_a($this->data);
        }