From: Marc G. K. <ma...@it...> - 2003-01-24 15:02:45
|
Robin Rainton zei: > Hi, > > My folder_sizes plugin uses the sqimap_get_small_header_list function in > the following context: > > --- code segment --- > $num_messages = sqimap_get_num_messages($imapConnection, $mailbox); > if ($num_messages > 0) { > sqimap_mailbox_select($imapConnection, $mailbox); > $issent = handleAsSent($mailbox); > $msgs_list = sqimap_get_small_header_list($imapConnection, > range(1, $num_messages), > $issent); > --- code segment --- > SM 1.3 / 1.4 make use of UID's for messages instead of ID's if enabled (default) in conf.pl (uid_support). That's why range (1, $num_messages) is wrong. > Anyhow... so yesterday this worked, but with today's new CVS updates the > following errors come out: > > --- errors --- > ERROR : Could not complete request. > Unknown response from IMAP server: 1. > > Warning: Invalid argument supplied for foreach() in > /hsphere/local/home/raintonr/squirrelmail-cvs/squirrelmail/functions/imap_messages.php > on line 526 > --- errors --- > > I think this is a bit odd. I take a look at the imap_messages.php code and > see this on line 426: > > function sqimap_get_small_header_list ($imap_stream, $msg_list) { > > Ie. sqimap_get_small_header_list only requires 2 arguments now. Hmmm... > OK, so I go look for an example of how it's called now and I find this on > line 77: > > $res = sqimap_get_small_header_list($imap_stream, array($id), $sent); > You can check the function and see if the third argument is used. If not it requires 2 arguments (don't remember exactly the changes I made). Regards, Marc Groot Koerkamp. |