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

Larry Garfield larry at garfieldtech.com
Thu May 3 18:24:10 UTC 2007


On Thu, 3 May 2007 21:02:40 +0300, Mohammed Sameer <msameer at foolab.org> wrote:

>> >The tasks would be fairly simple:
>> >
>> >1. Modify variable get to take one argument
>> >2. Find all variable_gets and their corresponding default, move the
>> >default to an _install
>> >3. Document it on the update/modules page
>> >4. Rejoice
>> >5. Console killes
>> >
>> >I'd be happy to run with that if people like the approach.
>>
>> Indeed, makes a lot of sense to me. I'd be glad if you could run with
>> this and submit a patch. But wait for more positive reactions first :)
>>
>> Gabor
> 
> If we have it as a hook then we don't really need to clean them up in
> hook_uninstall() because
> drupal can invoke the variables defaults hook, get the list of variables
> and simply delete
> them from the "registry". We now only have one problem. hook uninstall
> runs when the module
> is unloaded but then, we can implement the extra hook in the .install file
> ?
> 
> Hope I'm not talking nonsense ;-)

If implemented that way, I believe that would qualify as one of those "Rare Hooks" I talked about earlier. :-)  

--Larry Garfield



More information about the development mailing list