made it possible to have a base imap directory for folders
authorlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 4 Apr 2000 00:59:25 +0000 (00:59 +0000)
committerlkehresman <lkehresman@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 4 Apr 2000 00:59:25 +0000 (00:59 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@384 7612ce4b-ef26-0410-bec9-ea0150e637f0

AUTHORS
UPDATES [deleted file]
config/config_default.php
functions/imap_mailbox.php
functions/page_header.php
src/folders_create.php
src/move_messages.php

diff --git a/AUTHORS b/AUTHORS
index 338d21e85c977fbd6ea18103e27bc003b9994c75..02e4e3f9ab30e5898812393e5c48e0170e0c4894 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,10 +1,10 @@
-Luke Ehresman
-Nathan Ehresman
+Luke Ehresman (lehresma@css.tayloru.edu)
+Nathan Ehresman (nathan@usa.om.org)
 Gustav Foseid
-Sergiusz Pawlowicz
+Pål Løberg
 Shane Wilson
+Sergiusz Pawlowicz
 Steve Gare
-Pål Løberg
 
 Translations:
 
diff --git a/UPDATES b/UPDATES
deleted file mode 100644 (file)
index 24c80ad..0000000
--- a/UPDATES
+++ /dev/null
@@ -1,2 +0,0 @@
-Add your name, and the update in this file.
--------------------------------------------
index 603616982f5a40b4bb55fd6e311ab280bc6db87e..1cfe25d015b9353dd95b6111004c75b26eeba8c1 100644 (file)
 //  folders will be the same color as the other folders
     $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
+//  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/";
+//        -- or --
+//     $folder_prefix = "Mail/folders/";
+//
+//  If you do not use this, please set it to "".
+    $folder_prefix = "";
+
 //  The following are related to deleting messages.
 //    $move_to_trash
 //         - if this is set to "true", when "delete" is pressed, it
index 997d65726144adbc27d9339f8c97652a85b5f84d..1820158485dd2ea02928714833b7142a06f889f6 100755 (executable)
@@ -94,7 +94,7 @@
     **  The array returned looks like this:
     ******************************************************************************/
    function sqimap_mailbox_list ($imap_stream) {
-      global $special_folders, $list_special_folders_first;
+      global $special_folders, $list_special_folders_first, $folder_prefix;
       
       if (!function_exists ("ary_sort"))
          include ("../functions/array.php");
 
          if (!$read_ary[$i+1]) {
             if ($phase == "inbox") {
-               fputs ($imap_stream, "a001 LSUB \"\" *\r\n");
+               if ($folder_prefix && (substr($folder_prefix, -1) != $dm))
+                  $folder_prefix = $folder_prefix . $dm;
+                           
+               fputs ($imap_stream, "a001 LSUB \"$folder_prefix\" *\r\n");
                $read_ary = sqimap_read_data ($imap_stream, "a001", true, $response, $message);
                $phase = "lsub";
                $i--;
index 48509bf10a6c7b5e2743972d9226245d2ca25cca..cc347f2a34bf5f129b301134109a783e6fc642b3 100644 (file)
@@ -58,7 +58,7 @@
       echo "         <A HREF=\"folders.php\">" . _("Folders") . "</A>&nbsp&nbsp";
       echo "         <A HREF=\"options.php\">" . _("Options") . "</A>&nbsp&nbsp";
       echo "      </TD><TD ALIGN=right WIDTH=30%>";
-      echo "         <A HREF=\"http://squirrelmail.sourceforge.net\" TARGET=_top>SquirrelMail</A>";
+      echo "         <A HREF=\"http://squirrelmail.sourceforge.net/index.php3?from=1\" TARGET=_top>SquirrelMail</A>";
       echo "      </TD>";
       echo "</TABLE>";
   }
index 321d16e772e8f38f2e9c799fa60148b9ef8636ef..9cddfc87ed7831ac1674fb6e794c78ee74415cb9 100644 (file)
    if ($contain_subs == true)
       $folder_name = "$folder_name$dm";
 
-   if (trim($subfolder) == "[ None ]") {
-      sqimap_mailbox_create ($imapConnection, $folder_name, "");
+   if ($folder_prefix && (substr($folder_prefix, -1) != $dm)) {
+      $folder_prefix = $folder_prefix . $dm;
+   }
+   if ($folder_prefix && (substr($subfolder, 0, strlen($folder_prefix)) != $folder_prefix)){
+      $subfolder_orig = $subfolder;
+      $subfolder = $folder_prefix . $subfolder;
+   }
+
+   if (trim($subfolder_orig) == "[ None ]") {
+      sqimap_mailbox_create ($imapConnection, $folder_prefix.$folder_name, "");
    } else {
       sqimap_mailbox_create ($imapConnection, $subfolder.$dm.$folder_name, "");
    }
index 56e96e7404a558be3022fa6a08a21b99f843c337..e236174547871c2956b80770c2f3d0120a42d144 100644 (file)
@@ -12,7 +12,7 @@
 
    include("../src/load_prefs.php");
 
-   echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+//   echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
 
    function putSelectedMessagesIntoString($msg) {
       $j = 0;
@@ -42,7 +42,7 @@
 
    // If the delete button was pressed, the moveButton variable will not be set.
    if (!$moveButton) {
-      displayPageHeader($color, $mailbox);
//     displayPageHeader($color, $mailbox);
       if (is_array($msg) == 1) {
          // Marks the selected messages ad 'Deleted'
          $j = 0;
          }
          if ($auto_expunge)
             sqimap_mailbox_expunge($imapConnection, $mailbox);
-         messages_deleted_message($mailbox, $sort, $startMessage, $color);
+
+         if ($auto_forward) {   
+            header ("Location: right_main.php");
+         } else {
+            echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+            displayPageHeader($color, $mailbox);
+            messages_deleted_message($mailbox, $sort, $startMessage, $color);
+         }
       } else {
+         echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+         displayPageHeader($color, $mailbox);
          error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
       }
    } else {    // Move messages
-      displayPageHeader($color, $mailbox);
+//      displayPageHeader($color, $mailbox);
       // lets check to see if they selected any messages
       if (is_array($msg) == 1) {
          $j = 0;
          if ($auto_expunge == true)
             sqimap_mailbox_expunge($imapConnection, $mailbox);
 
-         messages_moved_message($mailbox, $sort, $startMessage, $color);
+         if ($auto_forward) {   
+            header ("Location: right_main.php");
+         } else {
+            echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+            displayPageHeader($color, $mailbox);
+            messages_moved_message($mailbox, $sort, $startMessage, $color);
+         }
       } else {
+         echo "<HTML><BODY TEXT=\"$color[8]\" BGCOLOR=\"$color[4]\" LINK=\"$color[7]\" VLINK=\"$color[7]\" ALINK=\"$color[7]\">\n";
+         displayPageHeader($color, $mailbox);
          error_message(_("No messages were selected."), $mailbox, $sort, $startMessage, $color);
       }
    }