update
[squirrelmail.git] / src / folders.php
index 0942ddbf19626a718d620892c6365cbee9fd63d3..7b7ec043a66d59175e1a7d9f9e476b01b75ac8bd 100644 (file)
@@ -4,6 +4,7 @@
    include("../functions/strings.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
+   include("../functions/mailbox.php");
 
    displayPageHeader("None");
 
    }
 
    /** DELETING FOLDERS **/
+
    echo "<FORM ACTION=folders_delete.php METHOD=POST>\n";
-   echo "<SELECT NAME=folder_list><FONT FACE=\"Arial,Helvetica\">\n";
+   echo "<SELECT NAME=mailbox><FONT FACE=\"Arial,Helvetica\">\n";
    for ($i = 0; $i < count($str); $i++) {
+      $thisbox = Chop($str[$i]);
+      $thisbox = findMailboxName($thisbox);
       $use_folder = true;
       for ($p = 0; $p < count($special_folders); $p++) {
          if ($special_folders[$p] == $long_name_boxes[$i])
             $use_folder = false;
       }
       if ($use_folder == true)
-         echo "   <OPTION>$boxes[$i]\n";
+         echo "   <OPTION>$thisbox\n";
    }
    echo "</SELECT>\n";
    echo "<INPUT TYPE=SUBMIT VALUE=Delete>\n";
@@ -57,7 +61,7 @@
    for ($i = 0;$i < count($str); $i++) {
       $thisbox = Chop($str[$i]);
       $thisbox = findMailboxName($thisbox);
-      $thisbox = getBoxForCreate($thisbox);
+      $thisbox = getFolderNameMinusINBOX($thisbox);
       echo "<OPTION>$thisbox\n";
    }
    echo "</SELECT>\n";