Bug #15740 Updated: It is better to replace imap_getquota() with imap_getquotaroot() in php_imap.c.

From: Date: Wed, 27 Feb 2002 02:20:53 +0000
Subject: Bug #15740 Updated: It is better to replace imap_getquota() with imap_getquotaroot() in php_imap.c.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1125@lists.php.net to get a copy of this message
ID: 15740 Updated by: yohgaki@php.net Reported By: pg@finesse-net.de -Status: Open +Status: Feedback Bug Type: IMAP related Operating System: Solaris 2.8 SPARC PHP Version: 4.1.1 New Comment: Could you post unified diff against current CVS source to php-dev list? Previous Comments: ------------------------------------------------------------------------ [2002-02-26 18:56:00] pg@finesse-net.de It is better to replace "imap_getquota()" with "imap_getquotaroot()" in php_imap.c, because the latter is usable by the user so no need to create a mailbox admin user. The IMAP4-Request "GETQUOTA" only works with a special privileged imap user. For the "normal" user "GETQUOTAROOT" is usable. GETQUOTAROOT(*) gives 2 output lines, the Quota root directory and the Storage Quota. IMAP 2001 perfectly handles this with the function imap_getquotaroot. It is in line 1031 of ext/imap/php_imap.c: - if(!imap_getquota(imap_le_struct->imap_stream, Z_STRVAL_PP(qroot))) + if(!imap_getquotaroot(imap_le_struct->imap_stream, Z_STRVAL_PP(qroot))) Tested with Cyrus IMAPD 2.0.16 and Sun iPlanet Messaging Server 5.1. With this you can get the quota of every mailbox opened by typing: $quota_array = imap_get_quota($mb,"INBOX"); Pascal (*) in raw session it will look like this: A001 GETQUOTAROOT INBOX * QUOTAROOT INBOX user.pascal * QUOTA user.pascal (STORAGE 80280 10000000) A001 OK Completed IMAP2001 C-Client handles this with imap_getquotaroot(). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=15740&edit=1

« previous php.bugs (#1125) next »