From 84d46e4ee219902f7c95b0cc2342623ea9f31866 Mon Sep 17 00:00:00 2001 From: teepe Date: Sun, 14 Jul 2002 16:08:56 +0000 Subject: [PATCH] make indentation start at '' indentation. (Code elegancy not yet 100% :-( ) git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3100 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/html.class | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/class/html.class b/class/html.class index 60c0c139..b2a5f757 100644 --- a/class/html.class +++ b/class/html.class @@ -80,7 +80,12 @@ class html { $this->htmlAdd($el); } - function echoHtml( $usecss=false, $indent='') { + function echoHtml( $usecss=false, $indent='x') { + if ($indent == 'x') { + $indent = ''; $indentmore = ''; + } else { + $indentmore = $indent . ' '; + } $tag = $this->tag; $text = $this->text; $class = $this->class; @@ -149,7 +154,6 @@ class html { } } echo "\n"; - $indentmore = $indent . ' '; for($i = 0;$i<$cnt;$i++) { $el = $this->html_el[$i]; $el->echoHtml($usecss,$indentmore); @@ -163,7 +167,7 @@ class html { } } if ($tag) { - echo ''."\n"; + echo $indent . ''."\n"; } else { echo "\n"; } -- 2.25.1