Commit graph

311 commits

Author SHA1 Message Date
pdontthink
ceac9866ed Change to new hook function, as elsewhere in same file 2004-01-05 04:21:31 +00:00
stekkel
a9cc9cad50 * first unsubscribe before we delete
* fail silently on unsubscribe
2003-11-10 17:46:37 +00:00
Thijs Kinkhorst
336662934c Add some basic documentation, and remove some long-obsolete functions. 2003-10-29 19:58:06 +00:00
tassium
9098cb73e4 Preparation to begin using phpdocumentor.
Added basic @package/@subpackage tags
The decode/ files were documented slightly more thoroughly, although they're almost self-explanatory anyway.

The individual functions in the functions/ files need to be documented though, and now that this commit is in, anyone willing to write docblocks for functions should get cracking ;)
2003-10-28 21:27:47 +00:00
tassium
350bbcd288 New hook function: boolean_hook_function(), which is used for hooks that want a true/false value from the plugins. Currently used in isSpecialMailbox() 2003-09-04 20:26:53 +00:00
alex-brainstorm
bf4258331a advanced_tree: sort mailboxes naturally, handle special folders the same as in oldway (subs and hook) 2003-08-22 01:28:16 +00:00
alex-brainstorm
6486e173a2 replace htmlentities() with htmlspecialchars() since it is broken with non iso-8859-1 8bit chars 2003-08-17 15:26:50 +00:00
alex-brainstorm
1e7b52dd08 Mailbox names are html encoded in select/option and not trimmed out. Store noinferiors flag to be used in left_main advanced tree. 2003-07-30 14:03:24 +00:00
stekkel
3c428c2892 remove the % from the LSUB request because we do not need it.
fixed speed issue for loop
2003-07-28 18:48:55 +00:00
stekkel
c6f51d497c Disable \NoSelect flag for INBOX.
Maker sure INBOX is stored in uppercase
2003-07-28 18:43:12 +00:00
alex-brainstorm
e6cb0cca51 removed encode_mailbox_name() and changed calls since it is now in imap_general. removed INBOX name encoding. removed folder_prefix from forged LSUB INBOX response. 2003-07-23 12:12:14 +00:00
jangliss
0febb64ec6 Should have checked in further details what the possible side effects could
be... for now just mark them as Special Folders.  That should take care of
it.
2003-07-17 06:32:50 +00:00
jangliss
206f1e8c13 When using sent subfolders, the special folder option is overruled because
the parent isn't marked as a special folder.  This code forces the parents
of the special folders to also be marked as special.  The rest of the subs
for the parent special should follow the movement of the parent in left_main
2003-07-17 06:29:38 +00:00
alex-brainstorm
6b8f490b9f oldway=false : Fix forged LSUB response triggered by new regexp, and internationalized INBOX display 2003-07-11 13:01:09 +00:00
alex-brainstorm
dab546e8da Fix literal and duplicate mailbox names 2003-07-11 10:51:54 +00:00
stekkel
959de6649a Remove check for INBOX. If inbox isn't in the LSUB response then it's
unsubscribed and we just add it to the list. No reason to check specificly
for LSUB "" "INBOX" or LIST "" "INBOX"
If there is no inbox then a select will produce an error message.
2003-07-10 20:20:05 +00:00
alex-brainstorm
7f62730491 fix mailbox list (noselect and array_values) 2003-07-04 22:06:13 +00:00
stekkel
dfe15394f6 Hopefully fixed pipelined responses, I did something stupid and didn't test
out of order reponses. Now it works.
In imap_mailbox te array with mailbox objects wasn't create correctly. It
contained double entries. That's fixed too.
2003-07-03 11:45:02 +00:00
stekkel
0edf989acc To many problems with this regex call. using \\\\ instead of \\ seems to
work for everyone. If somebody can explain why \\ is not sufficient please
explain.
2003-06-29 19:40:08 +00:00
stekkel
f49d96086f always check total messages for the trash_folder so we can show the putge
link if move_to_trash = true
2003-06-29 19:27:27 +00:00
stekkel
7ae4125fda request LIST calls / mailbox and STATUS info by using pipelined imap-calls.
This means we do the imap-call and don't wait for the response and continue
with the next mailbox.
Because we remember the issued tags we are able to retrieve the
imap-responses and assign the response to the correct mailbox.

The advantage of this method is that we don't have to wait on each response.
2003-06-29 10:54:48 +00:00
stekkel
906c957d32 Make skiplist check casesensitive 2003-06-28 23:40:36 +00:00
stekkel
3dbb229eee make use of sqimap_run_command instead of forbidden local fputs 2003-06-28 21:45:29 +00:00
jangliss
cf0854c003 UW sends \NoSelect in LIST and not in LSUB, which is perfectly fine by
RFCs, but we didn't do that.  For UW IMAP, force a LIST command on each
mailbox, this should also fix the \NoSelect on INBOX if it occurs.

Also updated the check for \NoSelect to include the LIST option as well as
LSUB.
2003-06-21 18:16:28 +00:00
stekkel
14794fc426 Do utf7 decode after we created the tree, otherwise we cannot match
unsubscribed parent_boxes. Besides it's more efficient
2003-06-19 12:58:43 +00:00
jangliss
5d93559e5f Now that I have seemed to have fixed the INBOX issue with courier/uw,
enabling this code actually does good in uw (it hides the mail/ non-select
folder), and makes the folders all line up.  In courier, folders no longer
appear (though they still are) subs of inbox... should we change this?

Retested code with exchange, cyrus, uw, and courier, all seem good now.
2003-06-19 05:40:56 +00:00
jangliss
1f53859766 Forgot that $lsub_ibx[0] would be unset if LSUB didn't return INBOX, so
it'd never run the LIST code.  This meant in the case where they weren't
subbed to their INBOX, it'd never appear.

Thanks shaug for helping spot that.
2003-06-18 21:58:03 +00:00
stekkel
ff03b4283a imap_utf7 decoding of mailboxes (mailbox-tree) 2003-06-18 20:13:23 +00:00
jangliss
3d391f4472 Eugh, this code is getting messy, can somebody verify this regex for me,
I'm trying to get it to match on "INBOX" or INBOX but nothing afterwards,
but some IMAP servers are returning an extra char or two on the end, so
a direct match is messing up, so I've tried something a little different
and told it to do a full match, but fail it if the next char after INBOX is
a delimiter (do we have a full list of possibilities?).

Tested on uw, courier, exchange, and cyrus, and the list builds nicely now.
uw still has some odd behaviours when you have a default folder prefix, but
the others seem a lot better... got to do some minor tweaks, and I think this
can go for full testing.
2003-06-16 03:59:45 +00:00
jangliss
55ecf21b0c Back again... should have looked at my exchange window first... *grumbles*
UW is a royal pain :P
2003-06-15 06:57:24 +00:00
jangliss
bde60ca9f9 UW can return a slightly different format for the LSUB when you step outside
the default_folder_prefix area, also they return NIL for the delimiter which
means the previous regex would always fail as it is looking for a 1 char
delimiter between ""
2003-06-15 06:52:48 +00:00
jangliss
184bbe5507 Couple of tweaks... must include inbox otherwise it becomes an unselectable
link, which isn't good.  Some weird stuff happens when using the default
folder prefix check, so removed... fixes courier and uw for having INBOXes,
now just have to make uw's inbox really work now.
2003-06-15 05:10:05 +00:00
jangliss
2d40cc0b02 Moved the INBOX check higher to save code duplication... something else in
here too... but cannot remember...
2003-06-15 03:21:45 +00:00
Erin Schnabel
bdb5ae1bbd Corrected display (on Courier at least) of mailboxes with INBOX
prefix. INBOX was being added to the tree twice (was already the
root), and then because it was root, the link (with proper nesting)
wasn't being displayed.

Also corrected setting 'noselect' for INBOX (now tree root) -
was being errantly set as 'flag' which was causing errors about
not havign noselect set...

Also removed the places where it was checking whether or not
noselect was set for a mailbox - given the structure, noselect should
always be set - and we should get an error if it isn't (for boxlist
formed from LSUB).
2003-06-15 00:40:58 +00:00
Thijs Kinkhorst
9c129d3265 E_ALL notice removal 2003-06-13 10:42:59 +00:00
Erin Schnabel
20b51df26d UW Folder badness take two. 2003-05-01 04:56:50 +00:00
Erin Schnabel
eaccc266f1 Additional tweaks for folder create/rename/delete display and behavior. 2003-05-01 01:46:57 +00:00
Erin Schnabel
4626ea9a10 First crack at 725443. 2003-05-01 00:09:14 +00:00
jangliss
9e667d7a4a Empty $mailbox causes sent append to break. 2003-04-14 18:21:44 +00:00
Thijs Kinkhorst
b2cd55c4bd Fix copyerror, this eliminates some warnings of undefined index in the msg list. 2003-03-10 16:31:57 +00:00
stekkel
0c732bedbd lot's of fixes:
* removed htmlspecialchars from charset_decode because of double
htmlspecialchars calls
* fix for \NoSelect folders
* code cleanups
* added htmlspecialchars for displayattachmnent (filename)
* fixed charset issue with base64 encoded strings (decodeHeader)
2003-02-24 18:49:53 +00:00
Erin Schnabel
a28c320c37 Fix for 636577.
Make subfolders of Sent/Drafts show To: instead of From:
(like Sent and Drafts do already).
Needs some UW verification but should work pretty well.
2003-02-07 20:34:09 +00:00
tassium
c153825d61 Removed function sqimap_mailbox_has_children() from imap_mailbox.php
Marc pointed out that \HasChildren is an extension, not part of IMAP4rev1.
Got the effect I needed from already existing code.

Summary: Display purge link for trash in all cases, this time done in accordance with RFC 2060. (Eliminates an extra IMAP call, too.)
2003-01-10 15:48:49 +00:00
tassium
fa8f8b94e4 Fixed left_main.php to show purge link for trash if it contains folders but no messages.
New function in functions/imap_mailbox.php: sqimap_mailbox_has_children(mailbox,stream)
(Stream is optional)
2003-01-09 19:22:15 +00:00
Thijs Kinkhorst
75de52f258 Getting ready for 1.4.0 RC1 2002-12-31 12:49:43 +00:00
stekkel
44fd88a40a fix for checking specialmailboxes.
This solves the problem when a special mailbox isn't set and IsBoxBelow
gives a warning
2002-11-14 10:29:30 +00:00
Thijs Kinkhorst
342677f96d Of course the real fix for using utf7-functions inconsistently is making them more
consistent, so from now on we assume that all input to these imap_mailbox_ functions is
utf7 in stead of non-utf7 for some and utf7 for others.
2002-10-28 15:01:49 +00:00
Thijs Kinkhorst
33c53f089b Fix inconsequent use of utf7_encode which causes problems with creating/renaming
folders with special chars like '&': sometimes doesn't get encoded, other times does,
sometimes gets encoded twice.
2002-10-28 14:24:45 +00:00
Thijs Kinkhorst
fbd91a1a58 Merge utf7_decode_local and utf7_encode_local into one file. 2002-10-28 13:00:44 +00:00
Thijs Kinkhorst
bc654ad1e2 Obsolete array.php 2002-10-26 17:10:21 +00:00