30 Sep
2005
30 Sep
'05
2:18 p.m.
Hi! global variables are hard to debug and error prone. Let's make it explicit: drupal_set($module, $key, $value = NULL, $force = FALSE) { static $storage; if ($value || $force) { $storage[$module][$key] = $value; } return $storage[$module][$key]; } drupal_get($module, $key) { return drupal_set($module, $key); } $force is useful when you want to set to NULL ie. delete a value. If we can't find a revelant module for a core global value, we can use 'system'. Regards NK