? 211188_project_overview_type_13.patch
? 236943_project_release_javascript.patch
? disable_auto_alias_overview.patch
? project-list-all-20080411.patch
? project_168009_2.patch
Index: /Applications/MAMP/htdocs/rg/drupal/sites/all/modules/project/release/project_release.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project/release/project_release.module,v
retrieving revision 1.67
diff -u -p -r1.67 project_release.module
--- release/project_release.module	29 Mar 2008 08:33:35 -0000	1.67
+++ release/project_release.module	13 Apr 2008 17:16:17 -0000
@@ -891,8 +891,30 @@ function project_release_project_release
 /**
  * Get an array of release nodes
  * @ingroup project_release_api
+ *
+ * @param $project
+ *   The project node object.
+ * @param $nodes
+ *   If set, an array of release nodes will be returned.
+ *   Otherwise only the version field will be returned in the array value.
+ * @param $sort_by
+ *   This can be 'date' or 'version' and determines how the releases
+ *   returned are to be sorted.
+ * @param $filter_by
+ *   This can be 'all' to include all releases or 'files' to return
+ *   only releases which have a file attached.
+ * @param $rid
+ *   This is a special parameter that can be used to allow one
+ *   release to be returned even if the node itself is unpublished.
+ *   This is useful when this function is called by the project_issue
+ *   module to allow a user to keep the version of an issue unchanged
+ *   even if the release represented by the version is now unpublished.
+  * @return
+ *   An array of releases.  The keys are the release node nids.  The values
+ *   will either be release objects or release version strings, depending
+ *   on the value of the $nodes parameter.
  */
-function project_release_get_releases($project, $nodes = true, $sort_by = 'version', $filter_by = 'all') {
+function project_release_get_releases($project, $nodes = TRUE, $sort_by = 'version', $filter_by = 'all', $rid = NULL) {
   if ($sort_by == 'date') {
     $order_by = 'n.created';
   }
@@ -901,7 +923,12 @@ function project_release_get_releases($p
   }
   $where = '';
   if (!project_check_admin_access($project)) {
-    $where = 'AND (n.status = 1)';
+    if (!empty($rid) && is_numeric($rid)) {
+      $where = "AND (n.status = 1 OR n.nid = $rid)";
+    }
+    else {
+      $where = 'AND (n.status = 1)';
+    }
     if ($filter_by == 'files') {
       $where .= " AND (r.file_path <> '')";
     }
