[imp] expanding imp folder maintenance functions
Michael M Slusarz
slusarz at mail.curecanti.org
Tue Jul 26 13:01:31 PDT 2005
Quoting brook davis <brook at linuxbox.com>:
> Hi all,
>
> Ok, so I've decided to go with the Maintenance Tasks. So far, I've been
> unable to figure out exactly how these integrate into the system. To
> test, I've developed a dummy task and I've made the following steps:
>
>
> 1)
> I've added:
>
> imp/lib/Maintenance/Task/test_maintenance.php
>
> this file contains a class definition:
>
> class Maintenance_Task_test_maintenance extends Maintenance_Task {}
>
> Inside the class are two dummy functions, doMaintenance() and
> describeMaintenance(). The first simply returns true, the second
> returns a descriptive string.
>
> 2)
> I've added the following to the $maint_tasks array in
> imp/lib/Maintenance/imp.php:
>
> 'test_maintenance' => MAINTENANCE_MONTHLY
>
> 3)
> I've added the following to imp/config/prefs.php:
>
> $_prefs['test_maintenance'] = array(
> 'value' => 0,
> 'locked' => false,
> 'shared' => false,
> 'type' => 'checkbox',
> 'desc' => _("Test Maintenance?"));
>
>
> However, I'm still unable to get the UI class to print my form
> elements. Can anyone offer a suggestion on how I might be able to
> accomplish this? I've searched through the code, but I must be missing
> something here. What are the steps to integrate a task through the
> Maintenance API?
You need to add 'test_maintenance' to a $prefsGroup entry near the top
of the prefs.php.dist file (in the 'members' array element).
michael
_______________________________________
Michael Slusarz [slusarz at curecanti.org]
More information about the imp
mailing list