make indentation start at '' indentation. (Code elegancy not yet 100% :-( )
authorteepe <teepe@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 14 Jul 2002 16:08:56 +0000 (16:08 +0000)
committerteepe <teepe@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 14 Jul 2002 16:08:56 +0000 (16:08 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3100 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/html.class

index 60c0c139aae0977cd769bf84f2b8e93776288407..b2a5f75757cba5fcd23478f4c4cf3bc48d737447 100644 (file)
@@ -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 '</'.$tag.'>'."\n";
+       echo $indent . '</'.$tag.'>'."\n";
     } else {
        echo "\n";
     }