Преглед на файлове

fixed bug that enabled creating folders under "noinferior" folders

lkehresman преди 25 години
родител
ревизия
19afe0c492
променени са 1 файла, в които са добавени 25 реда и са изтрити 13 реда
  1. 25 13
      trunk/squirrelmail/src/folders.php

+ 25 - 13
trunk/squirrelmail/src/folders.php

@@ -84,19 +84,31 @@
       echo "<OPTION>[ None ]\n";
       echo "<OPTION>[ None ]\n";
 
 
    for ($i = 0; $i < count($boxes); $i++) {
    for ($i = 0; $i < count($boxes); $i++) {
-//      for ($j = 0; $j < count($boxes[$i]["flags"]); $j++) {
-//         if ($boxes[$i]["flags"][$j] != "noinferiors") {
-            if (($boxes[$i]["unformatted"] == $special_folders[0]) && ($default_sub_of_inbox == true)) {
-               $box = $boxes[$i]["unformatted"];
-               $box2 = replace_spaces($boxes[$i]["formatted"]);
-               echo "<OPTION SELECTED VALUE=\"$box\">$box2\n";
-            } else {
-               $box = $boxes[$i]["unformatted"];
-               $box2 = replace_spaces($boxes[$i]["formatted"]);
-               echo "<OPTION VALUE=\"$box\">$box2\n";
-            }
-//         }   
-//      }
+      if (count($boxes[$i]["flags"]) > 0) {
+         for ($j = 0; $j < count($boxes[$i]["flags"]); $j++) {
+            if ($boxes[$i]["flags"][$j] != "noinferiors") {
+               if (($boxes[$i]["unformatted"] == $special_folders[0]) && ($default_sub_of_inbox == true)) {
+                  $box = $boxes[$i]["unformatted"];
+                  $box2 = replace_spaces($boxes[$i]["formatted"]);
+                  echo "<OPTION SELECTED VALUE=\"$box\">$box2\n";
+               } else {
+                  $box = $boxes[$i]["unformatted"];
+                  $box2 = replace_spaces($boxes[$i]["formatted"]);
+                  echo "<OPTION VALUE=\"$box\">$box2\n";
+               }
+            }   
+         }    
+      } else {
+         if (($boxes[$i]["unformatted"] == $special_folders[0]) && ($default_sub_of_inbox == true)) {
+            $box = $boxes[$i]["unformatted"];
+            $box2 = replace_spaces($boxes[$i]["formatted"]);
+            echo "<OPTION SELECTED VALUE=\"$box\">$box2\n";
+         } else {
+            $box = $boxes[$i]["unformatted"];
+            $box2 = replace_spaces($boxes[$i]["formatted"]);
+            echo "<OPTION VALUE=\"$box\">$box2\n";
+         }
+      }
    }
    }
    echo "</SELECT></TT><BR>\n";
    echo "</SELECT></TT><BR>\n";
    if ($show_contain_subfolders_option) {
    if ($show_contain_subfolders_option) {