--- download_count.module.orig	2007-03-06 12:21:32.000000000 -0800
+++ download_count.module	2007-03-28 18:48:17.000000000 -0700
@@ -149,9 +149,11 @@
 
   if(user_access('view all downloads count')) {
 	  $result = db_query("SELECT fd.filename, fd.count, fd.timestamp, f.nid, n.type FROM {file_downloads} fd JOIN {files} f ON f.filepath = CONCAT('%s', fd.filename) JOIN {node} n ON n.nid = f.nid"  . tablesort_sql($header), $fileDirectoryPath);
+	  $result2 = db_query("SELECT fd.filename, fd.count, fd.timestamp, f.nid, n.type FROM {file_downloads} fd JOIN {project_release_nodes} f ON f.file_path = CONCAT('%s', fd.filename) JOIN {node} n ON n.nid = f.nid"  . tablesort_sql($header), $fileDirectoryPath);
 	}
 	else {
 	  $result = db_query("SELECT fd.filename, fd.count, fd.timestamp, f.nid, n.type FROM {file_downloads} fd JOIN {files} f ON f.filepath = CONCAT('%s', fd.filename) JOIN {node} n ON n.nid = f.nid WHERE n.uid = %d" . tablesort_sql($header), $fileDirectoryPath, $user->uid);
+	  $result2 = db_query("SELECT fd.filename, fd.count, fd.timestamp, f.nid, n.type FROM {file_downloads} fd JOIN {project_release_nodes} f ON f.file_path = CONCAT('%s', fd.filename) JOIN {node} n ON n.nid = f.nid WHERE n.uid = %d" . tablesort_sql($header), $fileDirectoryPath, $user->uid);
 	}
 	
   while ($file = db_fetch_object($result)) {
@@ -162,6 +164,15 @@
     $row[] = l(t('view ' . $file->type), 'node/' . $file->nid);
 	$rows[] = $row;	
   }
+  
+  while ($file = db_fetch_object($result2)) {
+    $row = array();
+    $row[] = $file->filename;
+	$row[] = $file->count;	
+	$row[] = format_interval(time() - $file->timestamp) . ' ago';	
+    $row[] = l(t('view ' . $file->type), 'node/' . $file->nid);
+	$rows[] = $row;	
+  }
 
   if (empty($rows)) {
     $rows[] = array(array('data' => t('No file attachment has been downloaded.'), 'colspan' => '4'));
