[dev] IMP::serverString()
Jon Parise
jon@horde.org
Thu, 13 Jun 2002 01:28:29 -0400
On Wed, Jun 12, 2002 at 08:29:40PM +0100, Nuno Loureiro wrote:
> I'd like to include this little patch in IMP HEAD, since that,
> according to PHP Manual the port number and the protocol are optional in
> the mailbox name used in imap_open() and other imap functions.
[snip]
> - return '{' . $imp['server'] . ':' . $imp['port'] . '/' . $protocol . '}';
> + (empty($imp['port'])) ? $port_str = '' : $port_str = ':' . $imp['port'];
> + (empty($protocol)) ? $protocol_str = '' : $protocol_str = '/' . $protocol;
> + return '{' . $imp['server'] . $port_str . $protocol_str . '}';
No objection to the patch in principle, but please expand the new code
a bit more to improve readable, and a comment explaining the rationale
is also in order.
--
Jon Parise (jon@csh.rit.edu) . Information Technology (2001)
http://www.csh.rit.edu/~jon/ : Computer Science House Member