? 126554_package-and-check-supported.patch
? 233052_p_link_alter.patch
? 233785_project_hide_title_8.patch
? project_access_own_projects.patch
Index: /Applications/MAMP/htdocs/rss/drupal/sites/all/modules/project/project.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/project.inc,v
retrieving revision 1.124
diff -u -p -r1.124 project.inc
--- project.inc	15 Mar 2008 20:09:39 -0000	1.124
+++ project.inc	15 Apr 2008 11:16:56 -0000
@@ -258,7 +258,7 @@ function project_project_set_breadcrumb(
     $breadcrumb = array_merge($breadcrumb, $extra);
   }
   elseif ($extra && !empty($node)) {
-    $breadcrumb[] = l($node->title, 'node/'. $node->nid);
+    $breadcrumb[] = l(project_get_project_title($node), 'node/'. $node->nid);
   }
 
   drupal_set_breadcrumb($breadcrumb);
@@ -555,3 +555,51 @@ function project_page_link_alter($node, 
     $function($node, $all_links);
   }
 }
+
+/**
+ * Determines whether a project's title should be hidden or displayed.
+ * This function does not need to be called when displaying the project
+ * node itself, but should be used when displaying the project title elsewhere,
+ * for example in a project issue node, project issue node breadcrumb, or an
+ * rss feed of project issues.
+ *
+ * @param $project
+ *   The project node.
+ * @param $always_display_title
+ *   If true, the actual title will be displayed regardless of whether
+ *   the current user has permission to view the full project node.
+ * @return
+ *   The project title, or, if it should be hidden, the hidden title.
+ */
+function project_get_project_title($project, $always_display_title = FALSE) {
+  if (!empty($project->title)) {
+    if ($always_display_title || node_access('view', $project)) {
+      return theme('project_project_title', $project, FALSE);
+    }
+  }
+  return theme('project_project_title', $project, TRUE);
+}
+
+/**
+ * Themes the project title that is displayed in breadcrumbs, project issue
+ * metadata tables, and project issue e-mail messages.
+ *
+ * @param $project
+ *   The project node.
+ * @param $hide_title
+ *   Whether or not the title should be hidden.
+ * @return
+ *   The text to use for the project title.
+ */
+function theme_project_project_title($project, $hide_title = TRUE) {
+  // Text to return as title if user does not have view permission on project node.
+  $hidden_title = '**********';
+
+  if (!empty($project->title) && !$hide_title) {
+    return $project->title;
+  }
+  else {
+    return $hidden_title;
+  }
+}
+
