bugfixes
[squirrelmail.git] / src / folders.php
index 2a8889f74145a1b1ceb9ea9e7ff36dd5a0d60d9e..5fb7a6c531353f0737abdcaebd07182ec2291cda 100644 (file)
    echo "<TR><TD BGCOLOR=\"$color[4]\" ALIGN=CENTER>";
 
    $count_special_folders = 0;
-   for ($p = 0; $p < count($boxes); $p++) {
+       $num_max = 1;
+       if ($move_to_trash)
+               $num_max++;
+       if ($move_to_sent)
+               $num_max++;
+
+   for ($p = 0; $p < count($boxes) && $count_special_folders < $num_max; $p++) {
+               echo "$count_special_folders - $p<br>";
       if (strtolower($boxes[$i]["unformatted"]) == "inbox")
          $count_special_folders++;
       else if ($boxes[$i]["unformatted"] == $trash_folder)