Code

Fixed text: hanling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Mar 2007 07:05:00 +0000 (07:05 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 23 Mar 2007 07:05:00 +0000 (07:05 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5868 594d385d-05f5-0310-b6e9-bd551577e9d8

include/sieve/class_My_Tree.inc

index d935a20aa8f1245225fc950eba7dddf21aa87e43..f54312d48ee19e96b2000a184156aaaaebf5655c 100644 (file)
@@ -581,7 +581,18 @@ class My_Tree extends Tree
         $tmp3 = split("\n",$tmp2);
         foreach($tmp3 as $str){
           $str2 = trim($str);
-          $tmp.= $buffer.$str."\n";
+
+          /* If the current line only contains an '.'    
+           *  we must skip the line indent. 
+           * The text: statement uses a single '.' to mark the text end.
+           * This '.' must be the only char in the current line, no
+           *  whitespaces are allowed here.
+           */
+          if($str2 == "."){
+            $tmp.=$str."\n";
+          }else{
+            $tmp.= $buffer.$str."\n";
+          }
         }
         if(get_class($part) == "sieve_block_start"){
           $buffer .= SIEVE_INDENT_TAB;