Code

Fixed comment handling inside tags
[gosa.git] / include / sieve / class_sieveElement_If.inc
index 56a25b385855c15872b76246ead4401f33d20d24..60b04c9394d673b48c6d057ce7048d3371a02110 100644 (file)
@@ -51,6 +51,15 @@ class sieve_if
         "gt"  => _("greater than"),
         "ne"  => _("not equal"));
 
+    /* Remove comments from tests */  
+    $tmp = array();
+    foreach($elements['ELEMENTS'] as $ele){
+      if($ele['class'] != "comment"){
+        $tmp[] = $ele;
+      }
+    }
+    $elements['ELEMENTS'] = $tmp;
+
     $this->object_id       = $object_id;
     if($elements!=NULL){
       $this->elements = $elements;