Commit graph

225 commits

Author SHA1 Message Date
stekkel
b171edd0dc temp fixes, as long as we didn't adapt our mailbox tree code, cache the
list.

Make use of the sorted list with id's from the session if the mailbox state
didn't change.

All performance related imap fixes were found after playing with thetereal.
If you want to try itt yourself:

tethereal -t a -ni lo -f 'port 143' -R 'imap.request'
with lo the interface.
2004-05-17 19:48:57 +00:00
stekkel
157a422c57 removed debug statement 2004-05-17 15:55:33 +00:00
stekkel
85bee15f35 Removed kind of insane check. The check mailbox is subscribed call retrieved
the whole subscription list and looked up if the requested mailbox was part
of it. It's better to subscribe and surpress the NO response if already
subscribed.
2004-05-17 15:45:37 +00:00
Erin Schnabel
f59c3343ef remove call to expunge in sqimap_mailbox_select 2004-04-29 03:48:13 +00:00
tokul
17c56f73ed two more subpackage blocks 2004-04-12 08:03:39 +00:00
Erin Schnabel
7a611a6ea9 updates for move & next when moving first message 2004-03-29 18:55:16 +00:00
Thijs Kinkhorst
5a4550f372 Remove almost all left overs of our non-uid-imap-server support. 2004-03-15 20:15:16 +00:00
stekkel
358d622748 unsetting an array element didn't re-index the array which caused a failure
when we added the INBOX response to the array at a later stage. This is
confirmed on PHP 4.1.2. The version I'm using (4.3.4) didn't had that
problem. Probably this fix us a php-bug workaround.
2004-03-02 21:05:57 +00:00
stekkel
c51abba34c Fixed the issue where inbox showed up in the lsub response with a \NoSelect
flag. If we detect inbox with \NoSelect we unset the result for inbox and do
a list request for inbox.
2004-02-26 18:01:59 +00:00
Thijs Kinkhorst
e424ef3bc1 Tweak the LSUB INBOX regexp to allow for only 1 space between LSUB and
the mailbox name.
2004-02-25 17:28:39 +00:00
Thijs Kinkhorst
634f4d6cdc Fix the display of a subfolder "foo.inbox" aswell. 2004-02-25 14:38:05 +00:00
Thijs Kinkhorst
b7c512df9a Require whitespace in the LSUB before the mailbox name to prevent a
subfolder called "foo.bar.inbox" to be treated as INBOX.
2004-02-25 14:25:49 +00:00
Thijs Kinkhorst
cde0377d36 We're living in 2004 now... perl is your friend for these kinds of things :) 2004-02-24 15:51:22 +00:00
Erin Schnabel
dcad776393 Added function to update arrays etc for DMN.
plugin is officially integrated, even if I had to add a method I hated to do it.
so there.
2004-01-28 05:17:13 +00:00
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