[dev] Re-post: two small patches
John Morrissey
jwm at horde.net
Fri Apr 18 12:44:42 PDT 2003
I posted a couple small quota-related patches a while ago that never got a
response. I figured people were just busy, but it's been long enough that I
figure they got overlooked.
* quota-nit.patch
Removes the border around the quota display; it looked a little funny
since little else in the imp interface is bordered.
* courier-quota.patch
PHP generates undefined index warnings if the Courier IMAP server can't
retrieve a user's quota information. The attached patch silences them.
john
--
John Morrissey _o /\ ---- __o
jwm at horde.net _-< \_ / \ ---- < \,
www.horde.net/ __(_)/_(_)________/ \_______(_) /_(_)__
-------------- next part --------------
Index: imp/templates/quota/quota.inc
===================================================================
RCS file: /repository/imp/templates/quota/quota.inc,v
retrieving revision 1.1
diff -u -r1.1 quota.inc
--- imp/templates/quota/quota.inc 22 Jul 2002 16:18:54 -0000 1.1
+++ imp/templates/quota/quota.inc 25 Mar 2003 19:19:35 -0000
@@ -1,9 +1,5 @@
-<table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr><td class="item">
- <table border="0" cellspacing="2" cellpadding="2" width="100%">
- <tr><td align="center" class="<?php echo $class ?>">
- <?php echo $message ?>
- </td></tr>
- </table>
+<table width="100%" border="0" cellpadding="3" cellspacing="0">
+ <tr><td class="<?php echo $class ?>" align="center">
+ <?php echo $message ?>
</td></tr>
</table>
-------------- next part --------------
Index: imp/lib/Quota/courier.php
===================================================================
RCS file: /repository/imp/lib/Quota/courier.php,v
retrieving revision 1.10
diff -u -r1.10 courier.php
--- imp/lib/Quota/courier.php 3 Jan 2003 23:31:34 -0000 1.10
+++ imp/lib/Quota/courier.php 25 Mar 2003 16:54:50 -0000
@@ -31,9 +31,9 @@
$quota = @imap_get_quota($stream, 'ROOT');
@imap_close($stream);
if (is_array($quota)) {
- if ($quota['limit'] != 0) {
+ if (!empty($quota['limit'])) {
return $this->_quotaHTML($quota['usage'] * 1024, $quota['limit'] * 1024);
- } elseif ($quota['STORAGE']['limit'] != 0) {
+ } elseif (!empty($quota['STORAGE']['limit'])) {
return $this->_quotaHTML($quota['STORAGE']['usage'] * 1024, $quota['STORAGE']['limit'] * 1024);
}
}
More information about the dev
mailing list