summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 98a0f92)
raw | patch | inline | side by side (parent: 98a0f92)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 08:23:05 +0000 (08:23 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 29 Mar 2007 08:23:05 +0000 (08:23 +0000) |
Updated Vacation to save the reason attribute as > text: ... <
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5920 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5920 594d385d-05f5-0310-b6e9-bd551577e9d8
include/sieve/class_My_Tree.inc | patch | blob | history | |
include/sieve/class_sieveElement_Vacation.inc | patch | blob | history |
index ee1276a36ac3c1aba3c85281c0f2aa6b0bd2696b..cc9600b6b4ecc9b247fa381aeb5ed888c8bc3d53 100644 (file)
$ret = "text: \r\n".$data."\r\n.\r\n";
}else{
$ret = "\"".$data."\"";
+ $ret = preg_replace("/\"\"/","\"",$ret);
}
}
- $ret = preg_replace("/\"\"/","\"",$ret);
$ret = preg_replace("/\n/","\r\n",$ret);
return($ret);
$id ++;
}
}elseif($data[$id]['class'] == "quoted-string"){
- $ret[] = $data[$id]['text'];
+ $text = $data[$id]['text'];
+ $text= preg_replace("/^\"/","",$text);
+ $text= preg_replace("/\"$/","",$text);
+ $ret[] = $text;
}elseif($data[$id]['class'] == "number"){
$ret[] = $data[$id]['text'];
}elseif($data[$id]['class'] == "multi-line"){
diff --git a/include/sieve/class_sieveElement_Vacation.inc b/include/sieve/class_sieveElement_Vacation.inc
index 9bb4a41b4ef1c8a8fad1ccb26fcfecb6a1bf64b9..477a7fe0ce2520c89d323f33c13e99101e80abae 100644 (file)
foreach($strs as $str){
$data .= $str;
}
- $this->reason = $data;//preg_replace("/\"/","",$data);
+ $this->reason = $data;
}
}
}
if($this->mime){
$str.= ":mime ".sieve_create_strings($this->mime);
}
- $str .= "\n ".sieve_create_strings($this->reason);
+
+ /* Append reason and ensure that this will be
+ * handled as multiline text element
+ * by adding a "\n" new line
+ */
+ $str .= "\n ".sieve_create_strings($this->reason."\n");
return($str." ; \n");
}
foreach($tmp2 as $val){
$ad = trim(preg_replace("/\"/","",$val));
if(!empty($ad)){
- $tmp[] = "\"".$ad."\"";
+ $tmp[] = $ad;
}
}
$this->addresses = $tmp;
/* Get reason */
if(isset($_POST['vacation_reason_'.$this->object_id])){
$vr = stripslashes ($_POST['vacation_reason_'.$this->object_id]);
- $this->reason = "\"".trim(preg_replace("/\"/","",$vr))."\"";
+ $this->reason = trim($vr);
}
}
$msgs = array();
$err = FALSE;
foreach($this->addresses as $addr){
- if(!is_email(preg_replace("/\"/","",$addr))){
+ if(!is_email($addr)){
$err = true;
}
}