From 8c7dfc9960e03539b2ab145a37a3752cb8b31b4d Mon Sep 17 00:00:00 2001 From: lkehresman Date: Mon, 29 Nov 1999 01:07:41 +0000 Subject: [PATCH] updated some folder stuff git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@32 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/imap.php | 10 ++++++++++ functions/mailbox.php | 10 ++++++++++ src/folders.php | 9 --------- src/folders_delete.php | 37 ++++++++++++++++++++++++++++++++----- 4 files changed, 52 insertions(+), 14 deletions(-) diff --git a/functions/imap.php b/functions/imap.php index 2121271f..979128fa 100644 --- a/functions/imap.php +++ b/functions/imap.php @@ -30,4 +30,14 @@ } return strrev($temp); } + + /** must be sent in the form: user.. **/ + function createFolder($imapConnection, $folder) { + fputs($imapConnection, "1 create \"$folder\"\n"); + } + + /** must be sent in the form: user.. **/ + function deleteFolder($imapConnection, $folder) { + fputs($imapConnection, "1 delete \"$folder\"\n"); + } ?> diff --git a/functions/mailbox.php b/functions/mailbox.php index 548706bd..a4110476 100644 --- a/functions/mailbox.php +++ b/functions/mailbox.php @@ -152,4 +152,14 @@ selectMailbox($imapConnection, $mailbox, $num); fputs($imapConnection, "1 EXPUNGE\n"); } + + function getFolderNameMinusINBOX($mailbox) { + if (substr($mailbox, 0, 6) == "INBOX.") + $box = substr($mailbox, 6, strlen($mailbox)); + else + $box = $mailbox; + + return $box; + } + ?> diff --git a/src/folders.php b/src/folders.php index 7dc1947d..5ce49644 100644 --- a/src/folders.php +++ b/src/folders.php @@ -1,14 +1,5 @@
Return"; ?> -- 2.25.1