[imp] Bug in Quota Mechanism for Cyrus IMAP and PHP 4.2.X and lower

Jan Schneider jan at horde.org
Sat Dec 13 08:38:53 PST 2003


Zitat von Roel Gloudemans <roel at gloudemans.info>:

> Hi,
>
> There is a bug in the determination of the quota of a mailbox. When using
> Cyrus
> IMAP and PHP 4.2.X or lower, it says "Unable to determine Quota".
>
> The bug is located in imp/lib/Quota/cyrus.php
>
> The following code is used to determine the quota
> if (function_exists('imap_get_quotaroot')) {
>   @$quota = imap_get_quotaroot($_SESSION['imp']['stream'], 'INBOX');
> } else {
>   $stream = @imap_open(IMP::serverString(), $this->_params['login'],
> this->_params['password'], OP_HALFOPEN);
>   if ($stream !== false) {
>     $quota = @imap_get_quota($stream, 'INBOX');
>     @imap_close($stream);
>   }
> }
>
> PHP 4.3.X and higher use the function imap_get_quotaroot, PHP 4.2.X use
> imap_get_quota, however the syntaxis for this function is incorrect. It
> should
> be something like (I use / as the mailbox separator not ., so the syntax
> below
> works for me):
> $quota = @imap_get_quota($stream, 'user/'.$_SESSION['imp']['user']);

Can anybody running these versions confirm this?

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the imp mailing list