[development] low hanging fruit for Drupal 6: variable defaults

Greg Knaddison - GVS Greg at GrowingVentureSolutions.com
Thu May 3 22:09:28 UTC 2007


On 5/3/07, Dries Buytaert <dries.buytaert at gmail.com> wrote:
>
> On 03 May 2007, at 21:43, Peter Wolanin wrote:
> > I don't think the suggestion below makes sense (setting variable
> > defaults via hook_install), at least if we assume that the way to
> > reset a module setting is to delete the corresponding variable.
>
> Setting a variable on hook_install sounds clumsy, especially when we
> have /dynamic/ variables of the form:
>
>    variable_get($node->type ."_something", ...)
>
> You simply don't know at install time, what variables might become
> available later on ...

But isn't that true whether it's in hook_install or in hook_settings
or in the define mechanism that you proposed?

I don't have an answer to Peter's point about resetting to defaults so
I agree the approach is half baked and should probably be abandoned.

Greg


More information about the development mailing list