Index: project_issue.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/project_issue/project_issue.module,v
retrieving revision 1.88.2.16
diff -u -r1.88.2.16 project_issue.module
--- project_issue.module	24 Feb 2009 00:58:47 -0000	1.88.2.16
+++ project_issue.module	22 Jul 2009 06:12:03 -0000
@@ -1346,6 +1346,36 @@
 }
 
 /**
+ * Implementation of Token Module's hook_token_list()
+ */
+function project_issue_token_list($type, $object = NULL) {
+  if ($type == 'project_issue') {
+    $tokens['project_issue']['project_issue_pid'] = t("The issue's project nid");
+    $tokens['project_issue']['project_issue_project_title'] = t("The issue's project title");
+    $tokens['project_issue']['project_issue_project_title-raw'] = t("The issue's project title raw");
+    $tokens['project_issue']['project_issue_project_uri'] = t("The issue's project short name");
+    return $tokens;
+  }
+}
+
+/**
+ * Implementation of Token Module's hook_token_values()
+ */
+function project_issue_token_values($type = 'all') {
+  if ($type == 'project_issue') {
+    $project_issue = $object;
+    $project = node_load($project_issue->project['pid']);
+    if ($project->nid == $project_issue->project['pid']) {
+      $tokens['project_issue_pid'] = intval($object->project_issue['pid']);
+      $tokens['project_issue_project_title'] = check_plain($project->title);
+      $tokens['project_issue_project_title-raw'] = $project->title;
+      $tokens['project_issue_project_uri'] = check_plain($project->project['uri']);
+      return $tokens;
+    }
+  }
+}
+
+/**
  * Calculate the differences in project_issue comment metadata
  * between the original issue and a comment or between two
  * comments.
