From 733120bd12e241f51ec63f04eaac4d90b33febc5 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 26 Mar 2007 13:09:42 +0000 Subject: [PATCH] Some style fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5887 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/sieve/class_My_Tree.inc | 16 ++++++++++++---- include/sieve/templates/block_indent_start.tpl | 14 +++++++++----- include/sieve/templates/block_indent_stop.tpl | 4 +--- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/include/sieve/class_My_Tree.inc b/include/sieve/class_My_Tree.inc index 38d252302..06d70a8c3 100644 --- a/include/sieve/class_My_Tree.inc +++ b/include/sieve/class_My_Tree.inc @@ -61,13 +61,17 @@ class My_Tree extends Tree $this -> dump_ = ""; $ends = array(); - if(!count($this->pap)){ -# $this->pap[] = new sieve_comment(NULL,preg_replace("/[^0-9]/","",microtime()),$this); - } + $ends_complete_block = array(); + foreach($this->pap as $key => $object){ if(is_object($object)){ - $end = $this->get_block_end($key,false); + $end = $this->get_block_end($key,false); + $end2 = $this->get_block_end($key); + if($end != $key && in_array(get_class($object),array("sieve_if"))){ + $ends_complete_block[$end2] = $end2; + $this->dump_ .= "
 
"; + } if(isset($ends[$key])){ $this->dump_ .= $block_indent_stop; } @@ -76,6 +80,10 @@ class My_Tree extends Tree $ends[$end] = $end; $this->dump_ .= $block_indent_start; } + + if(isset($ends_complete_block[$key])){ + $this->dump_ .= "
 
"; + } } } diff --git a/include/sieve/templates/block_indent_start.tpl b/include/sieve/templates/block_indent_start.tpl index 016943a05..e9988f0c9 100644 --- a/include/sieve/templates/block_indent_start.tpl +++ b/include/sieve/templates/block_indent_start.tpl @@ -1,6 +1,10 @@ - + +
-
- - - + + - -
+ +   + + +
 
diff --git a/include/sieve/templates/block_indent_stop.tpl b/include/sieve/templates/block_indent_stop.tpl index 62ee76e63..0d6349e70 100644 --- a/include/sieve/templates/block_indent_stop.tpl +++ b/include/sieve/templates/block_indent_stop.tpl @@ -1,6 +1,4 @@ -
+
 
-- 2.30.2