From 4a225f5489efb794eb429a096889a590ac91223a Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 21 Mar 2007 08:14:18 +0000 Subject: [PATCH] Updated elements git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5843 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_sieveElement_Block_End.inc | 2 +- include/sieve/class_sieveElement_Block_Start.inc | 2 +- include/sieve/class_sieveElement_Comment.inc | 3 ++- include/sieve/class_sieveElement_Discard.inc | 2 +- include/sieve/class_sieveElement_Else_Elsif.inc | 2 +- include/sieve/class_sieveElement_Fileinto.inc | 4 ++-- include/sieve/class_sieveElement_If.inc | 1 + include/sieve/class_sieveElement_Keep.inc | 2 +- include/sieve/class_sieveElement_Redirect.inc | 2 +- include/sieve/class_sieveElement_Reject.inc | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/sieve/class_sieveElement_Block_End.inc b/include/sieve/class_sieveElement_Block_End.inc index 8f5739f1c..3bd0b0436 100644 --- a/include/sieve/class_sieveElement_Block_End.inc +++ b/include/sieve/class_sieveElement_Block_End.inc @@ -21,7 +21,7 @@ class sieve_block_end function get_sieve_script_part() { - return("}\n"); + return("}"); } function save_object() { diff --git a/include/sieve/class_sieveElement_Block_Start.inc b/include/sieve/class_sieveElement_Block_Start.inc index fc924ce8f..e001cdc58 100644 --- a/include/sieve/class_sieveElement_Block_Start.inc +++ b/include/sieve/class_sieveElement_Block_Start.inc @@ -26,7 +26,7 @@ class sieve_block_start function get_sieve_script_part() { - return("{\n"); + return("{"); } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: diff --git a/include/sieve/class_sieveElement_Comment.inc b/include/sieve/class_sieveElement_Comment.inc index 51c1d8f37..c235616ca 100644 --- a/include/sieve/class_sieveElement_Comment.inc +++ b/include/sieve/class_sieveElement_Comment.inc @@ -9,7 +9,7 @@ class sieve_comment function get_sieve_script_part() { - $str = "/*".$this->data."*/\n"; + $str = "\n/*".$this->data."*/"; return($str); } @@ -39,6 +39,7 @@ class sieve_comment $this->data .= $text."\n"; } + $this->data = rtrim($this->data)."\n"; } function check() diff --git a/include/sieve/class_sieveElement_Discard.inc b/include/sieve/class_sieveElement_Discard.inc index 504fe4adb..d152c6f7c 100644 --- a/include/sieve/class_sieveElement_Discard.inc +++ b/include/sieve/class_sieveElement_Discard.inc @@ -12,7 +12,7 @@ class sieve_discard function get_sieve_script_part() { - return("discard;\n"); + return("discard;"); } function check() { diff --git a/include/sieve/class_sieveElement_Else_Elsif.inc b/include/sieve/class_sieveElement_Else_Elsif.inc index e4b8046f8..c101bfad8 100644 --- a/include/sieve/class_sieveElement_Else_Elsif.inc +++ b/include/sieve/class_sieveElement_Else_Elsif.inc @@ -36,7 +36,7 @@ class sieve_else function get_sieve_script_part() { - return(" else "); + return("else"); } } diff --git a/include/sieve/class_sieveElement_Fileinto.inc b/include/sieve/class_sieveElement_Fileinto.inc index 71024ba06..a62e8eeaf 100644 --- a/include/sieve/class_sieveElement_Fileinto.inc +++ b/include/sieve/class_sieveElement_Fileinto.inc @@ -65,10 +65,10 @@ class sieve_fileinto function get_sieve_script_part() { $tmp = ""; - $tmp.= "\"".$this->data."\", "; + $tmp.= "\"".$this->data."\", "; $tmp = preg_replace("/,$/","",trim($tmp)); $tmp = preg_replace ("/\"\"/","\"",$tmp); - return("fileinto ".$tmp.";\n"); + return("fileinto ".$tmp.";"); } function execute() diff --git a/include/sieve/class_sieveElement_If.inc b/include/sieve/class_sieveElement_If.inc index 090880d6a..2ddd66d47 100644 --- a/include/sieve/class_sieveElement_If.inc +++ b/include/sieve/class_sieveElement_If.inc @@ -20,6 +20,7 @@ class sieve_if function sieve_if($elements,$object_id,$parent) { $this->parent = $parent; + print_a($elements);; /* Possible address parts we can select */ $this->address_parts = array( diff --git a/include/sieve/class_sieveElement_Keep.inc b/include/sieve/class_sieveElement_Keep.inc index 8a8a412b3..d1870ba14 100644 --- a/include/sieve/class_sieveElement_Keep.inc +++ b/include/sieve/class_sieveElement_Keep.inc @@ -30,7 +30,7 @@ class sieve_keep } function get_sieve_script_part() { - return("keep;\n"); + return("keep;"); } } diff --git a/include/sieve/class_sieveElement_Redirect.inc b/include/sieve/class_sieveElement_Redirect.inc index de599151e..47cea6020 100644 --- a/include/sieve/class_sieveElement_Redirect.inc +++ b/include/sieve/class_sieveElement_Redirect.inc @@ -45,7 +45,7 @@ class sieve_redirect function get_sieve_script_part() { - return("redirect ".sieve_create_strings($this->data).";\n"); + return("redirect ".sieve_create_strings($this->data).";"); } diff --git a/include/sieve/class_sieveElement_Reject.inc b/include/sieve/class_sieveElement_Reject.inc index 8bf9bb61b..cdb89f9fb 100644 --- a/include/sieve/class_sieveElement_Reject.inc +++ b/include/sieve/class_sieveElement_Reject.inc @@ -53,7 +53,7 @@ class sieve_reject function get_sieve_script_part() { - return("reject ".sieve_create_strings($this->data).";\n"); + return("reject ".sieve_create_strings($this->data).";"); } function execute() -- 2.30.2