[dev] Courier Quota patch

Sander Dalemans sander at gamerszone.nl
Mon Oct 4 13:28:44 PDT 2004


Hi,

because imap_get_quotaroot() returns an empty array when there is no 
quota limit the message "Unable to retrieve quota" is displayed. This 
patch fixes this. Now it shows "Quota status: NO LIMIT".

Sander Dalemans
-------------- next part --------------
Index: courier.php
===================================================================
RCS file: /repository/imp/lib/Quota/courier.php,v
retrieving revision 1.21
diff -u -r1.21 courier.php
--- courier.php	20 May 2004 15:45:34 -0000	1.21
+++ courier.php	4 Oct 2004 19:43:45 -0000
@@ -42,7 +42,7 @@
                 @imap_close($stream);
             }
         }
-        if (is_array($quota) && !empty($quota)) {
+        if (is_array($quota)) {
             if (!empty($quota['limit'])) {
                 return array('usage' => $quota['usage'] * 1024, 'limit' => $quota['limit'] * 1024);
             } elseif (!empty($quota['STORAGE']['limit'])) {


More information about the dev mailing list