Code

Heimdal stuff not needed. It's too insecure to read m-keys by php.
[gosa.git] / include / sieve / class_sieveElement_Redirect.inc
index 4f19c67e87c7dbd1473a177e5ed6fe16e704a5df..64e71b6f8bba0c88a5255be7681add920154da20 100644 (file)
@@ -31,19 +31,15 @@ class sieve_redirect
   {
     $this->object_id = $object_id;
 
-    if($data == NULL){
-      $data = array('ELEMENTS' => array(array('class' => "quoted-string" ,"text" => _("Put a mail address here"))));
+    if($data === NULL){
+      $data = array('ELEMENTS' => array(array('class' => "quoted-string" ,"text" => _("Place a mail address here"))));
     }
 
-    foreach($data['ELEMENTS'] as $key => $node ){
-      if(in_array($node['class'],array("quoted-string","text"))){
-        $tmp = sieve_get_strings($data['ELEMENTS'],$key);
-        if(count($tmp['STRINGS'])){
-
-          foreach($tmp['STRINGS'] as $str){
-            $this->data.= $str;
-          }
-        }
+    for($i = 0 ; $i < count($data['ELEMENTS']) ; $i++){
+      $tmp = sieve_get_strings($data['ELEMENTS'],$i);
+      $i  = $i + $tmp['OFFSET'];
+      foreach($tmp['STRINGS'] as $str){
+        $this->data .= $str;
       }
     }
   }