Index: pift.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/pift.pages.inc,v
retrieving revision 1.27
diff -u -r1.27 pift.pages.inc
--- pift.pages.inc	20 Nov 2009 22:21:04 -0000	1.27
+++ pift.pages.inc	20 Nov 2009 22:31:25 -0000
@@ -143,9 +143,10 @@
  * Theme attachments into a table with test results.
  *
  * @param array $files List of file attachments.
+ * @param boolean $closed Issue is closed.
  * @return string HTML output.
  */
-function theme_pift_attachments(array $files) {
+function theme_pift_attachments(array $files, $closed) {
   $header = array(t('Attachment'), t('Size'), t('Status'), t('Test result'), t('Operations'));
   $rows = array();
   foreach ($files as $file) {
@@ -169,7 +170,7 @@
     if ($file['status'] > PIFT_STATUS_QUEUE || $file['message']) {
       $operations[] = l(t('View details'), PIFT_SERVER . 'pifr/test/' . $file['test_id']);
     }
-    if ($file['status'] > PIFT_STATUS_SENT) {
+    if ($file['status'] > PIFT_STATUS_SENT && !$closed) {
       $operations[] = l(t('Re-test'), 'pift/retest/' . $file['test_id']);
     }
     $row[] = ($operations ? implode(' | ', $operations) : '<em>' . t('None') . '</em>');
Index: pift.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_test/pift.module,v
retrieving revision 1.32
diff -u -r1.32 pift.module
--- pift.module	20 Nov 2009 22:21:04 -0000	1.32
+++ pift.module	20 Nov 2009 22:31:25 -0000
@@ -119,6 +119,7 @@
     'pift_attachments' => array(
       'arguments' => array(
         'files' => array(),
+        'closed' => FALSE,
       ),
       'file' => 'pift.pages.inc',
     ),
@@ -208,9 +209,10 @@
     case 'view':
       if (!$a3 && pift_project_enabled($node->project_issue['pid'])) { // Full view.
         $files = pift_test_get_files_node($node->nid);
+        $closed = $node->project_issue['sid'] == PROJECT_ISSUE_STATE_CLOSED;
         $node->content['pift_files'] = array(
           '#value' => '<div id="pift-results-' . $node->nid . '">' .
-                      theme('pift_attachments', $files) . '</div>',
+                      theme('pift_attachments', $files, $closed) . '</div>',
           '#weight' => 50,
         );
         unset($node->content['files']); // Remove old attachments table.
@@ -268,8 +270,9 @@
         // Remove comment_upload attachments table and generate new one.
         $comment->comment = preg_replace('/<table class="comment-upload-attachments">.*?<\/table>/s', '', $comment->comment);
         $files = pift_test_get_files_comment($comment->cid);
+        $closed = $node->project_issue['sid'] == PROJECT_ISSUE_STATE_CLOSED;
         $comment->comment .= '<div id="pift-results-' . $comment->nid . '-' . $comment->cid . '">' .
-                             theme('pift_attachments', $files) . '</div>';
+                             theme('pift_attachments', $files, $closed) . '</div>';
       }
       break;
     case 'insert':
