Index: token.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v retrieving revision 1.7.4.9 diff -u -p -r1.7.4.9 token.module --- token.module 29 Aug 2008 15:21:40 -0000 1.7.4.9 +++ token.module 13 May 2009 09:42:34 -0000 @@ -257,7 +257,7 @@ function token_get_values($type = 'globa // Flush the static token cache. Useful for processes that need to slog through // huge numbers of tokens in a single execution cycle. Flushing it will keep // them from burning through memory. - if ($flush || !isset($tokens)) { + if ($flush || $options['flush'] || !isset($tokens)) { $tokens = array(); } @@ -283,7 +283,16 @@ function token_get_values($type = 'globa token_include(); - $id = _token_get_id($type, $object); + //either set custom ID + if ($options['token_id']) { + $id = $options['token_id']; + } + //or get default + else { + $id = _token_get_id($type, $object); + } + //Add suffix for token + if (isset($options['token_id_suffix'])) $id .= $options['token_id_suffix']; if (isset($tokens[$type][$id])) { $tmp_tokens = $tokens[$type][$id]; }