diff --git a/include/sieve/class_sieveElement_Vacation.inc b/include/sieve/class_sieveElement_Vacation.inc
index f2a562fcaaf518ccc820a70de711c825c734d129..6854b1862e5c74ff4c4e6a261770444bf3e17217 100644 (file)
function sieve_vacation($data,$object_id)
{
+
+ $this->object_id = $object_id;
/* Usage: vacation [":days" number] [":subject" string]
[":from" string] [":addresses" string-list]
[":mime"] [":handle" string] <reason: string> */
$known_attrs = array(":days",":subject",":from",":mime",":handle");
/* skip if empty */
- if($data == NULL) return;
+ if(($data == NULL) || !is_array($data)) return;
/* Walk through elements */
for($i = 0 ; $i < count($data['ELEMENTS']) ; $i ++){
}
/* Add the vacation message */
- if($node['class'] == "quoted-string"){
- $this->reason = $node['text'];
+ if(in_array($node['class'],array("quoted-string","multi-line"))){
+
+ $tmp = sieve_get_strings($data['ELEMENTS'],$i);
+ $strs= $tmp['STRINGS'];
+
+ $data = "";
+ foreach($strs as $str){
+ $data .= $str;
+ }
+ $this->reason = $data;//preg_replace("/\"/","",$data);
}
}
}