[development] Activate/Deactivate hooks for modules

Darrel O'Pry dopry at thing.net
Tue Jan 17 16:55:59 UTC 2006


On Sun, 2006-01-15 at 10:28 -0800, Kieran Lal wrote:
> On Jan 15, 2006, at 9:47 AM, David Reed wrote:
> 
> > I find my self longing for Activate and Deactivate hooks for  
> > modules.  These hooks would run only when the module is activated  
> > or deactivated in the admin/modules form This would give module  
> > developers a convenient place to run on-time setup code (e.g.  
> > database setup) and a place to do cleanup once their module was  
> > deactivated.
> >
> >
> > If there's interest I could create a patch for discussion.  Is  
> > there another easy way to accomplish these types of setup and  
> > cleanup tasks?
> 
> You probably want to talk to Vlado about his dependency system.
> 
> http://dikini.net/taxonomy/term/13
> 
> svn://mec0026.engi.cf.ac.uk/drpkg
> 
> I know his looking for folks to help build this into the grand  
> install vision.
> 
> Kieran
> >
> >

I second a hook_activate and hook_deactivate. I've wanted it for a
while. There is a lot of sanity checking that can be done on module
enable and disable that I think can have more benfit than just aiding an
installer module. (disabling permission modules restores default
permissions in a sane state. enabling forums after you've deleted their
vocabulary, etc.).



More information about the development mailing list