Index: token.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/token/token.module,v
retrieving revision 1.7.4.6
diff -u -u -r1.7.4.6 token.module
--- token.module	22 Mar 2008 13:20:35 -0000	1.7.4.6
+++ token.module	25 Mar 2008 20:36:46 -0000
@@ -21,13 +21,16 @@
  *    The suffix your module will use when parsing tokens. Defaults to ']'
  * @return An HTML table containing the formatting docs.
  **/
-function theme_token_help($type = 'all', $prefix = '[', $suffix = ']') {
+function token_help($types = array('global'), $prefix = '[', $suffix = ']') { 
   token_include();
-  $full_list = token_get_list($type);
+  $tokens = token_get_list($types);
+  return theme('token_help', $tokens, $prefix,  $suffix);
+}
 
+function theme_token_help($tokens, $prefix = '[', $suffix = ']') {
   $headers = array(t('Token'), t('Replacement value'));
   $rows = array();
-  foreach ($full_list as $key => $category) {
+  foreach ($tokens as $key => $category) {
     $rows[] = array(array('data' => drupal_ucfirst($key) . ' ' . t('tokens'), 'class' => 'region', 'colspan' => 2));
     foreach ($category as $token => $description) {
       $row = array();
@@ -286,17 +289,15 @@
  *   The array of usable tokens and their descriptions, organized by
  *   token type.
  */
-function token_get_list($type = 'all') {
+function token_get_list($types = array('global')) {
   token_include();
   $return = array();
   foreach (module_implements('token_list') as $module) {
     $function = $module .'_token_list';
-    $result = $function($type);
-    if (is_array($result)) {
-      foreach ($result as $category => $tokens) {
-        foreach ($tokens as $token => $title) {
-          $return[$category][$token] = $title;
-        }
+    foreach($types as $type) {
+      $result = $function($type);
+      if (is_array($result)) {
+        $return = array_merge_recursive($return, $result);
       }
     }
   }
