Code

Heimdal stuff not needed. It's too insecure to read m-keys by php.
[gosa.git] / include / sieve / class_sieveElement_Vacation.inc
index 3cb1b3929cb3da3d4182b3b2580f533d139428ac..43c7546377215877efee4065959c00d61d3a8980 100644 (file)
@@ -27,10 +27,11 @@ class sieve_vacation
     $known_attrs = array(":days",":subject",":from",":mime",":handle");
 
     /* skip if empty */
-    if(($data == NULL) || !is_array($data)) return;
+    if(($data === NULL) || !is_array($data)) return;
 
     /* Walk through elements */
-    for($i = 0 ; $i < count($data['ELEMENTS']) ; $i ++){
+    $p= count($data['ELEMENTS']);
+    for ($i= 0; $i < $p; $i++){
 
       /* get current element */
       $node = $data['ELEMENTS'][$i];
@@ -57,7 +58,7 @@ class sieve_vacation
             }
           }
         }else{
-              $this->addresses[] = $data['ELEMENTS'][$i]['text'] ;
+              $this->addresses[] =  preg_replace("/\"/i","",$data['ELEMENTS'][$i]['text']);
         }
       }
 
@@ -144,7 +145,7 @@ class sieve_vacation
       }
     }
     if($err){
-      $msgs[] = _("Alternative sender addresse must be valid email addresses.");
+      $msgs[] = _("Alternative sender address must be a valid email addresses.");
     }
     return($msgs);
   }