Have configtest check whether the sq_default_language is actually installed.
[squirrelmail.git] / src / folders.php
index b9d959db71a271f4bfeb589461724daa91354a8e..8865afe3180921f19f3d73e54e6bc83b296f4c1f 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * folders.php
  *
- * Copyright (c) 1999-2004 The SquirrelMail Project Team
+ * Copyright (c) 1999-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Handles all interaction between the user and the other folder
@@ -99,7 +99,7 @@ echo html_tag( 'table', '', 'center', '', 'width="70%" cellpadding="4" cellspaci
             ) .
             html_tag( 'tr' ) .
                 html_tag( 'td', '', 'center', $color[0] ) .
-     addForm('folders_create.php', 'POST', 'cf').
+     addForm('folders_create.php', 'post', 'cf').
      addInput('folder_name', '', 25).
      "<br />\n". _("as a subfolder of"). '<br />'.
      "<tt><select name=\"subfolder\">\n";
@@ -110,7 +110,7 @@ $server_type = strtolower($imap_server_type);
 if ( $server_type == 'courier' ) {
   array_push($skip_folders, 'inbox.trash');
   if ( $default_folder_prefix == 'INBOX.' ) {
-    array_push($skip_folders, 'inbox');
+    array_push($skip_folders, 'INBOX');
   }
 }
 
@@ -122,7 +122,7 @@ if ( $default_sub_of_inbox == false ) {
 }
 
 // Call sqimap_mailbox_option_list, using existing connection to IMAP server,
-// the arrays of folders to include or skip (assembled above), 
+// the arrays of folders to include or skip (assembled above),
 // use 'noinferiors' as a mailbox filter to leave out folders that can not contain other folders.
 // use the long format to show subfolders in an intelligible way if parent is missing (special folder)
 echo sqimap_mailbox_option_list($imapConnection, $show_selected, $skip_folders, $boxes, 'noinferiors', true);
@@ -159,32 +159,31 @@ if ($save_as_draft) {
 // What if move_to_sent = false and $sent_folder is set? Should it still be skipped?
 
 for ($p = 0, $cnt = count($boxes); $p < $cnt && $count_special_folders < $num_max; $p++) {
-    switch ($boxes[$p]['unformatted'])
-    {
-       case (strtoupper($boxes[$p]['unformatted']) == 'INBOX'):
-          ++$count_special_folders;
-         $skip_folders[] = $boxes[$p]['unformatted'];
-         break;
-       // FIX ME inbox.trash should be set in conf.pl
-       case 'inbox.trash':
-          if (strtolower($imap_server_type) == 'courier') {
-             ++$count_special_folders;
-         }
-         break;
-       case $trash_folder:
-           ++$count_special_folders;
-           $skip_folders[] = $trash_folder;
-          break;
-       case $sent_folder:
-           ++$count_special_folders;
-           $skip_folders[] = $sent_folder;
-          break;
-       case $draft_folder:
-           ++$count_special_folders;
-           $skip_folders[] = $draft_folder;
-          break;
-       default: break;
-    }    
+    switch ($boxes[$p]['unformatted']) {
+        case (strtoupper($boxes[$p]['unformatted']) == 'INBOX'):
+            ++$count_special_folders;
+            $skip_folders[] = $boxes[$p]['unformatted'];
+            break;
+        // FIX ME inbox.trash should be set in conf.pl
+        case 'inbox.trash':
+            if (strtolower($imap_server_type) == 'courier') {
+                ++$count_special_folders;
+            }
+            break;
+        case $trash_folder:
+            ++$count_special_folders;
+            $skip_folders[] = $trash_folder;
+            break;
+        case $sent_folder:
+            ++$count_special_folders;
+            $skip_folders[] = $sent_folder;
+            break;
+        case $draft_folder:
+            ++$count_special_folders;
+            $skip_folders[] = $draft_folder;
+            break;
+        default: break;
+    }
 }
 
 
@@ -200,7 +199,7 @@ if ($count_special_folders < count($boxes)) {
        . "<tt><select name=\"old\">\n"
        . '         <option value="">[ ' . _("Select a folder") . " ]</option>\n";
 
-    // use existing IMAP connection, we have no special values to show, 
+    // use existing IMAP connection, we have no special values to show,
     // but we do include values to skip. Use the pre-created $boxes to save an IMAP query.
     // send NULL for the flag - ALL folders are eligible for rename!
     // use long format to make sure folder names make sense when parents may be missing.
@@ -310,9 +309,9 @@ if(!$no_list_for_subscribe) {
     echo addForm('folders_subscribe.php?method=sub')
        . '<tt><select name="mailbox[]" multiple="multiple" size="8">';
 
-    for ($q = 0; $q < count($box); $q++) {      
-       echo '         <option value="$box[$q]">'.$box2[$q]."</option>\n";
-    }      
+    for ($q = 0; $q < count($box); $q++) {
+       echo '         <option value="' . $box[$q] . '">'.$box2[$q]."</option>\n";
+    }
     echo '</select></tt><br /><br />'
        . '<input type="submit" value="'. _("Subscribe") . "\" />\n"
        . "</form></td></tr></table><br />\n";
@@ -330,15 +329,11 @@ if(!$no_list_for_subscribe) {
 
 do_hook('folders_bottom');
 ?>
-
     </td></tr>
     </table>
-
 </td></tr>
 </table>
-
 <?php
    sqimap_logout($imapConnection);
 ?>
-
-</body></html>
+</body></html>
\ No newline at end of file