3 May
2007
3 May
'07
4:23 p.m.
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.