[development] low hanging fruit for Drupal 6: variable defaults
Aaron Winborn
aaron at culturefix.org
Thu May 3 14:23:53 UTC 2007
There are times one might try to access a variable defined by another
module, such as variable_get('site_name', 'Drupal'); This would make it
easier to avoid having to remember later if that's supposed to be
variable_get('site_name', 'drupal'), variable_get('site_name',
t('Drupal')), variable_get('site_name', SYSTEM_SITE_NAME_DEFAULT), or
whatever. I believe just calling variable_get('site_name') would
certainly makes things more standard, and easier to maintain.
And having a namespace available would be the cherry on top.
Aaron Winborn
Earnie Boyd wrote:
> variable_get('my_fine_var', MY_DEFAULT_VALUE) is simple enough. I
> don't understand why we would need to add this complication and overhead.
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aaron.vcf
Type: text/x-vcard
Size: 279 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20070503/2e7f45bc/attachment.vcf
More information about the development
mailing list