? LICENSE.txt ? token_includes.patch ? token_includes.txt Index: token.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/Attic/token.inc,v retrieving revision 1.1.2.7 diff -u -p -r1.1.2.7 token.inc --- token.inc 14 Apr 2007 12:39:58 -0000 1.1.2.7 +++ token.inc 2 May 2007 21:07:35 -0000 @@ -2,6 +2,22 @@ // $Id: token.inc,v 1.1.2.7 2007/04/14 12:39:58 eaton Exp $ /** + * General function to include the files that token relies on for the real work. + * + **/ +function token_include() { + $path = drupal_get_path('module', 'token'); + include_once("$path/token_node.inc"); + include_once("$path/token_user.inc"); + if (module_exists('content')) { + include_once("$path/token_cck.inc"); + } + if (module_exists('taxonomy')) { + include_once("$path/token_taxonomy.inc"); + } +} + +/** * Return the value of $original, with all instances of placeholder * tokens replaced by their proper values. To replace mutliple types * at once see token_replace_multiple(). @@ -174,6 +190,7 @@ function token_get_values($type = 'globa * token type. */ function token_get_list($type = 'all') { + token_include(); $return = array(); foreach (module_implements('token_list') as $module) { $function = $module .'_token_list'; Index: token.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v retrieving revision 1.5.2.6 diff -u -p -r1.5.2.6 token.module --- token.module 14 Apr 2007 12:39:58 -0000 1.5.2.6 +++ token.module 2 May 2007 21:07:35 -0000 @@ -15,7 +15,6 @@ function token_init() { } } - /** * For a given context, builds a formatted list of tokens and descriptions * of their replacement values. @@ -29,15 +28,7 @@ function token_init() { * @return An HTML table containing the formatting docs. **/ function theme_token_help($type = 'all', $prefix = '[', $suffix = ']') { - $path = drupal_get_path('module', 'token'); - include_once("$path/token_node.inc"); - include_once("$path/token_user.inc"); - if (module_exists('content')) { - include_once("$path/token_cck.inc"); - } - if (module_exists('taxonomy')) { - include_once("$path/token_taxonomy.inc"); - } + token_include(); $full_list = token_get_list($type); $headers = array(t('Token'), t('Replacement value'));