[dev] [PATCH] IMP : rework of the Quota class

Jan Schneider jan at horde.org
Tue Sep 23 16:03:35 PDT 2003


Zitat von Etienne Goyer <etienne.goyer at linuxquebec.com>:

> Hi,
>
> Here is a patch that rework the IMP Quota class. These change are quite
> intrusive.  The old API Quota::quotaHTML had been ripped out and
> replaced with the method Quota::getQuota.  Quota::quotaHTML printed
> in-place the quota information while Quota::getQuota instead return an
> associative array with the interesting quota information.  This give a
> better separation of presentation and logic IMHO, and make it possible
> to programmatically access quota information.  The presentation logic
> had been pushed in imp/templates/quota/quota.inc, where it belong
> (again, IMHO).

This is indeed the cleaner solution, thanks for putting work into that.

> This patch had been made againt the snapshot of 08/28/03.  mailbox.php,
> folders.php and message.php had been modified since, so they're maybe
> problem applying related chunk.  The change are small, so I suppose this
> could be worked around but I am willing to redo them if necessary.

A few comments as far as I can tell from reading the diff only:
- Are you missing a patch against quota.inc?
- The getQuota() methods should return a PEAR_Error, not a string if an
error occured.
- Please keep the quota code in folders.php at the same place and with the
same special code (opposed to mailbox.php and message.php) as before. It's
there for a reason.

Jan.

--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft


More information about the dev mailing list