You are viewing a plain text version of this content. The canonical link for it is here.
Posted to zeta-issues@incubator.apache.org by "Michael Kliewe (JIRA)" <ji...@apache.org> on 2010/12/03 14:53:11 UTC
[jira] Created: (ZETACOMP-32) Inconsistent parameter types and
little problems in ezcMailImapTransport
Inconsistent parameter types and little problems in ezcMailImapTransport
------------------------------------------------------------------------
Key: ZETACOMP-32
URL: https://issues.apache.org/jira/browse/ZETACOMP-32
Project: Zeta Components
Issue Type: Improvement
Components: Mail
Reporter: Michael Kliewe
In ezcMailImapTransport (I don't know if the same applies to other classes) the message id parameters are sometimes arrays, sometimes strings and sometimes int. Sometimes they are called $messages, sometimes $msgNum, sometimes $number.
For example in copyMessages it is a string. This is flexible, as you can pass "1,3,4" or "1:3" or even "2,4:7,9,12:*".
fetchSizes() expects an array, which is join()ed inside the method. This restricts to only comma-separated usage, something like "3:*" is not possible (besides using listmessages() to get all ids and then pass this big array). The same happens in fetchFlags() and sort().
In delete() it is called $msgNum and has to be an int, but it is used the same way as in copyMessages(), to be flexible it should be a string. Then you don't have to call delete() 1000 times if you want to delete 1000 messages.
Minor problems exist in fetchSizes() and fetchFlags. $messages has to be an array, so this is not working:
throw new ezcMailTransportException( "The IMAP server could not fetch flags for the messages '{$messages}': {$response}." );
If $messages is a string (see above) this problem will disappear.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.