From: hickert Date: Thu, 29 Mar 2007 08:13:15 +0000 (+0000) Subject: Fixed element loading for fileinto. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=98a0f9229ef4b176e174a10713554be444ca985b;p=gosa.git Fixed element loading for fileinto. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5919 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/sieve/class_sieveElement_Fileinto.inc b/include/sieve/class_sieveElement_Fileinto.inc index de30a9a1f..6ac66371c 100644 --- a/include/sieve/class_sieveElement_Fileinto.inc +++ b/include/sieve/class_sieveElement_Fileinto.inc @@ -2,7 +2,7 @@ class sieve_fileinto { - var $data = array(); + var $data = ""; var $object_id= -1; var $options = array(); var $parent = NULL; @@ -46,10 +46,17 @@ class sieve_fileinto $data = array('ELEMENTS' => array(array('class' => "quoted-string" ,"text" => $mbs[key($mbs)]))); } - /* Set mailbox */ - foreach($data['ELEMENTS'] as $node ){ + /* Load element contents, should normaly be only one string + * but if we found more than one, just append the following strings. + */ + foreach($data['ELEMENTS'] as $key => $node ){ if(in_array($node['class'],array("quoted-string","text"))){ - $this->data = preg_replace("/\"/","",$node['text']); + $tmp = sieve_get_strings($data['ELEMENTS'],$key); + if(count($tmp['STRINGS'])){ + foreach($tmp['STRINGS'] as $str){ + $this->data.= $str; + } + } } }