]> granicus.if.org Git - php/commitdiff
Adding in some BC for users to imap_get_quota() function
authorDan Kalowsky <kalowsky@php.net>
Thu, 1 Aug 2002 14:47:48 +0000 (14:47 +0000)
committerDan Kalowsky <kalowsky@php.net>
Thu, 1 Aug 2002 14:47:48 +0000 (14:47 +0000)
ext/imap/php_imap.c

index 664e54295273afe1f56a072afd9fc873343ef894..7873e47b05bb34d4d72f54726fd7f5de4ca36c48 100644 (file)
@@ -390,6 +390,12 @@ void mail_getquota(MAILSTREAM *stream, char *qroot, QUOTALIST *qlist)
                        FREE_ZVAL(IMAPG(quota_return));
                        return;
                }
+               if (strncmp(qlist->name, "STORAGE", 7) == 0)
+               {
+                       /* this is to add backwards compatibility */
+                       add_assoc_long_ex(IMAPG(quota_return), "usage", sizeof("usage"), qlist->usage);
+                       add_assoc_long_ex(IMAPG(quota_return), "limit", sizeof("limit"), qlist->limit);
+               }
 
                add_assoc_long_ex(t_map, "usage", sizeof("usage"), qlist->usage);
                add_assoc_long_ex(t_map, "limit", sizeof("limit"), qlist->limit);