|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-12-23 11:33 UTC] kaalh at smol dot org
imap_get_quota() return only an array with the last quota resource usage & limit. An IMAP4 server which supports the QUOTA capability may support limits on any number of resources (rfc2087) Maybe it should return all resources usages & limits in an associative array. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
It appears to me that the error is on the IMAP library: php_imap.c:1031:if(!imap_getquota(imap_le_struct->imap_stream, Z_STRVAL_PP(qroot))) { imap_getquota() is implemented by the IMAP library. I'll try and see if I can find the error on the library and then post a patch.My bad. The problem is really on php_imap.c, as noted by kaalh@smol.org. I have produced a patch to "fix" the behavior reported by llima@imagelink.com.br. I can't produce a patch to report all the resources as kaalh@smol.org suggested because that would break the compatibility :-/. Anyway, here's the (small) patch: --- php_imap.c Wed Apr 24 12:30:16 2002 +++ php_imap_fixed.c Sat Jul 6 15:47:55 2002 @@ -374,8 +374,12 @@ /* this should only be run through once */ for (; qlist; qlist = qlist->next) { - IMAPG(quota_usage) = qlist->usage; - IMAPG(quota_limit) = qlist->limit; + if (!strcmp(qlist->name, "STORAGE")) + { + IMAPG(quota_usage) = qlist->usage; + IMAPG(quota_limit) = qlist->limit; + break; + } } } /* }}} */ Suggestions or comments, please mail me. I haven't tested the patch yet, BTW!! But my good friend is testing it for me and I'll ask him to post the results here. :)