Patch for IMP - Add a preference to choose if you want to do
maintenance operations
Julian Jares
julian@jares.com.ar
Thu, 14 Mar 2002 23:05:32 -0300
---------------------- multipart/alternative attachment
Hi:
Since I see people asking for it, and I actually use it, here is an user
option
that allows users to skip maintenance every time... short patch...
for prefs.php.dist:
61c61
< 'members' => array('rename_sentmail_monthly',
'delete_sentmail_monthly',
---
> 'members' => array('do_maintenance','rename_sentmail_monthly',
'delete_sentmail_monthly',
311a312,320
>
> // actually do maintenance operations
> $_prefs['do_maintenance'] = array(
> 'value' => 1,
> 'locked' => false,
> 'shared' => false,
> 'type' => 'checkbox',
> 'desc' => _("Rename sent-mail folder at beginning of month")
> );
for lib/IMP.php
262,264c262,266
< include_once IMP_BASE . '/lib/Maintenance/imp.php';
< $maint = new Maintenance_IMP();
< $maint->runMaintenance();
---
> if ($prefs->getValue('do_maintenance')) {
> include_once IMP_BASE . '/lib/Maintenance/imp.php';
> $maint = new Maintenance_IMP();
> $maint->runMaintenance();
> }
Hope this helps
---------------------- multipart/alternative attachment--