Moving help files from sv to sv_SE
[squirrelmail.git] / src / left_main.php
index a3f2dfade924189c20c843c37b508ea327c94a65..427d6fc40d2857064fc126c07e22a9687b234999 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * left_main.php
  *
- * Copyright (c) 1999-2001 The Squirrelmail Development Team
+ * Copyright (c) 1999-2002 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * This is the code for the left bar. The left bar shows the folders
@@ -234,14 +234,12 @@ displayHtmlHeader( 'SquirrelMail', $xtra );
 
 /* If requested and not yet complete, attempt to autocreate folders. */
 if ($auto_create_special && !isset($auto_create_done)) {
-    $autocreate = array( $sent_folder,
-                         $trash_folder,
-                         $draft_folder );
+    $autocreate = array($sent_folder, $trash_folder, $draft_folder);
     foreach( $autocreate as $folder ) {
-        if ($folder != '' && $folder != 'none') {
+        if (($folder != '') && ($folder != 'none')) {
             if ( !sqimap_mailbox_exists($imapConnection, $folder)) {
                 sqimap_mailbox_create($imapConnection, $folder, '');
-            } elseif ( !sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
+            } else if (!sqimap_mailbox_is_subscribed($imapConnection, $folder)) {
                 sqimap_subscribe($imapConnection, $folder);
             }
         }
@@ -335,8 +333,11 @@ for ($i = 0;$i < count($boxes); $i++) {
         $line = "<NOBR><TT>$prefix</TT>";
 
         /* Add the folder name and link. */
+       if (! isset($color[15])) {
+            $color[15] = $color[6];
+       }
         if (in_array('noselect', $boxes[$i]['flags'])) {
-            $line .= "<FONT COLOR=\"$color[7]\">";
+            $line .= "<FONT COLOR=\"$color[15]\">";
             if (ereg("^( *)([^ ]*)", $mailbox, $regs)) {
                 $mailbox = str_replace('&nbsp;','',$mailbox);
                 $line .= str_replace(' ', '&nbsp;', $mailbox);