From bb6c0d200c04bcbaaa8b35d5fd5e1531060b22bb Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 14 Nov 2005 13:29:02 +0000 Subject: [PATCH] Updated category creation git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1941 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_xmlParse.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/class_xmlParse.inc b/include/class_xmlParse.inc index 42bfc3c69..68c7d2408 100644 --- a/include/class_xmlParse.inc +++ b/include/class_xmlParse.inc @@ -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); } -- 2.30.2