fixed formatting in case of oldway = false
authorstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 18 Jun 2003 19:45:55 +0000 (19:45 +0000)
committerstekkel <stekkel@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Wed, 18 Jun 2003 19:45:55 +0000 (19:45 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@5082 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/left_main.php

index 51632dd1bc75a18629adba240a15323a5e2cd45e..849544e7b10c57b3d504db2ec4703be4b4890dea 100644 (file)
@@ -292,17 +292,15 @@ function listBoxes ($boxes, $j=0 ) {
 
     if (isset($boxes) && !empty($boxes)) {
         $mailbox = $boxes->mailboxname_full;
-        $leader = '';
-        for ($k = 0; $k < $j; $k++) {
-            $leader.= '&nbsp;&nbsp;&nbsp;';
-        }
+        $leader = '<tt>';
+        $leader .= str_repeat('&nbsp;&nbsp;&nbsp;',$j);
         $mailboxURL = urlencode($mailbox);
 
         /* get unseen/total messages information */
-        if ($boxes->unseen) {
+        if ($boxes->unseen||$boxes->total) {
             $unseen = $boxes->unseen;
             $unseen_string = "($unseen)";
-            if ($unseen>0) {
+            if ($unseen>0||$boxes->total>0) {
                 $unseen_found = TRUE;
             }
 
@@ -320,7 +318,6 @@ function listBoxes ($boxes, $j=0 ) {
 
                 $unseen_string = $unseen_before . $unseen_string . $unseen_after;
             }
-
         } else {
             $unseen = 0;
         }
@@ -331,14 +328,14 @@ function listBoxes ($boxes, $j=0 ) {
 
             $link = '<a target="left" style="text-decoration:none" ' .'href="left_main.php?';
             if ($collapse) {
-                $link .= "unfold=$mailboxURL\">$leader +&nbsp;";
+                $link .= "unfold=$mailboxURL\">$leader+&nbsp;</tt>";
             } else {
-                $link .= "fold=$mailboxURL\">$leader -&nbsp;";
+                $link .= "fold=$mailboxURL\">$leader-&nbsp;</tt>";
             }
             $link .= '</a>';
             $pre .= $link;
         } else {
-            $pre.= $leader . '&nbsp;&nbsp;&nbsp;';
+            $pre.= $leader . '&nbsp;&nbsp;</tt>';
         }
 
         /* If there are unseen message, bold the line. */