[imp] bug in Quota.php and Quota/cyrus.php

Jean-Michel Besnard besnard at tekkno.net
Mon Dec 30 07:52:37 PST 2002


Hi,

I have noticed a bug in the cyrus quota driver of IMP.
When a user has a quota set in cyrus is using 0% of it most likely, when the
user has just been created) the quota bar in IMP says QUOTA NO LIMIT.

In Quota.php

if (!empty($used) && !empty($total))  is false if $used=0

so the solution would the following test instead
if ((!empty($used)|| $empty==0) && !empty($total))



Another bug in cyrus.php

                    return $this->_quotaHTML($quota['STORAGE']['usage'] * 1024,\
 $quota['STORAGE']['limit'] * 1024);


$quota does not have the index STORAGE, so it does not have to be
$quota['STORAGE']['usage'] or $quota['STORAGE']['limit']
 but $quota['usage'] or $quota['limit']

JM

-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/



More information about the imp mailing list