From 98a0f9229ef4b176e174a10713554be444ca985b Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 29 Mar 2007 08:13:15 +0000 Subject: [PATCH] Fixed element loading for fileinto. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5919 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_sieveElement_Fileinto.inc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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; + } + } } } -- 2.30.2