At 19.56 16/11/2005, you wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Wed, November 16, 2005 11:30, tonix (Antonio Nati) wrote:
>>> These routines substitute the original ones within
>>> functions/imap_messages.php.
>>>
>>> /**
>>> * Copy a set of messages ($id) to another mailbox ($mailbox)
>>> */
>>> function sqimap_msgs_list_copy($imap_stream, $id, $mailbox) { global
>>> $uid_support;
>>> $msgs_id = sqimap_message_list_squisher($id);
>>> $id_array = explode (",", $msgs_id);
>>> foreach ($id_array as $id_single) { $id_limits = explode (":",
>>> $id_single);
>>>
>>
>> Instead of doing two loops, simply use $id instead of $msgs_id.  The
>> sqimap_message_list_squisher is what convers a 1,2,3,4 to 1:4.  Or just
>> change:

>>   $msgs_id = sqimap_message_list_squisher($id);

>> Into:

>>   $msgs_id = $id;

>> It saves two loops, and processing you're never going to use anyway.

>>> $read = sqimap_mailbox_expunge($imap_stream, $mailbox, true); }

> Thanks!
> Code is much more compact and readable, with the changes you suggested.

[..]

>> And as somebody has already suggested, this can be quite expensive on
>> some IMAP servers.  It'll be even more costly on larger mailboxes, and
>> moving large amounts of emails will result in quite a slow down of your
>> interface, and most likely cause higher CPU usage on your web server.

> I agree, but how much is semplified life to end user?
> I feel people pay more for better services. They are not going to
> move often so large bunch od messages, but when it happens why deny them
> the possibility of making it easily?

In essence, it still really doesn't solve the issue.  You have a 5MB file,
and 2MB of quota left, you still have the same problem.  I believe your
change has probably just reduced the chance of it happening by a small
amount.

Reduces a lot. For my configuration it will solve 99,99% of problems.

I suggest to put in in production code, giving the SM administrator the possibility to chose which way he/she prefers.

Tonino

- --
Jonathan Angliss
<[EMAIL PROTECTED]>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iEYEARECAAYFAkN7gMUACgkQK4PoFPj9H3M6GwCghNe98URqf18sySjUBb0Xozb0
mFkAn1gcPeVPZaVKI8NBGa4GD047b4gc
=4Jj9
-----END PGP SIGNATURE-----




-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
--
squirrelmail-users mailing list
Posting Guidelines: 
http://www.squirrelmail.org/wiki/MailingListPostingGuidelines
List Address: [email protected]
List Archives: 
http://news.gmane.org/thread.php?group=gmane.mail.squirrelmail.user
List Archives:  http://sourceforge.net/mailarchive/forum.php?forum_id=2995
List Info: https://lists.sourceforge.net/lists/listinfo/squirrelmail-users

Reply via email to