Browse Source

added folder_prefix options

Luke Ehresman 25 years ago
parent
commit
a4663e3d1a
2 changed files with 13 additions and 5 deletions
  1. 7 4
      config/config_default.php
  2. 6 1
      functions/imap_mailbox.php

+ 7 - 4
config/config_default.php

@@ -36,18 +36,21 @@
     $use_special_folder_color = true;
 
 //  Many servers store mail in your home directory.  With this, they
-//  store them in a subdirectory: ~/mail or ~/Mail, etc.  If your
+//  store them in a subdirectory: mail/ or Mail/, etc.  If your
 //  server does this, please set this to what the default mail folder
 //  should be.  This is still a user preference, so they can change
 //  it if it is different for each user.
 //
 //  Example:
-//     $folder_prefix = "mail/";
+//     $default_folder_prefix = "mail/";
 //        -- or --
-//     $folder_prefix = "Mail/folders/";
+//     $default_folder_prefix = "Mail/folders/";
 //
 //  If you do not use this, please set it to "".
-    $folder_prefix = "";
+    $default_folder_prefix = "";
+//  If you do not wish to give them the option to change this, set it to false.
+//  Otherwise, if it is true, they can change the folder prefix to be anything.
+    $show_prefix_option = false;
 
 //  The following are related to deleting messages.
 //    $move_to_trash

+ 6 - 1
functions/imap_mailbox.php

@@ -94,7 +94,12 @@
     **  The array returned looks like this:
     ******************************************************************************/
    function sqimap_mailbox_list ($imap_stream) {
-      global $special_folders, $list_special_folders_first, $folder_prefix;
+      global $load_prefs_php, $prefs_php, $config_php, $data_dir, $username;
+      if (!isset($load_prefs_php))
+         include "../src/load_prefs.php";
+      else
+         global $folder_prefix;
+      global $special_folders, $list_special_folders_first, $default_folder_prefix;
       
       if (!function_exists ("ary_sort"))
          include ("../functions/array.php");