? .DS_Store
? 619650.drupalorg.patch-link-for-n00bs.patch
? project_issue.patch-help.patch
Index: drupalorg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drupalorg/Attic/drupalorg.module,v
retrieving revision 1.66.2.27
diff -u -p -r1.66.2.27 drupalorg.module
--- drupalorg.module	15 Jan 2010 00:04:59 -0000	1.66.2.27
+++ drupalorg.module	16 Jan 2010 19:18:02 -0000
@@ -39,6 +39,11 @@ define('DRUPALORG_SECURITY_CONTACT_URL',
 define('DRUPALORG_RELEASE_TYPE_HANDBOOK_URL', 'http://drupal.org/handbook/cvs/releases/types#type');
 
 /**
+ * URL for the handbook page that provides help on applying patches.
+ */
+define('DRUPALORG_PATCH_HANDBOOK_URL', 'http://drupal.org/patch/apply');
+
+/**
  * URL specifically to describe the "Security update" term.
  * For now, the general page for release types is the best we've got.
  */
@@ -699,3 +704,17 @@ function _drupalorg_node_add_project_iss
   return t('The creation of issues in this project is prohibited.');
 }
 
+/**
+ * Implementation of theme preprocessor for comment_upload_attachments.
+ *
+ * Adds a link to documentation to a patch file on a comment.
+ */
+function drupalorg_preprocess_comment_upload_attachments(&$variables) {
+  foreach ($variables['attachments'] as $id => $attachment) {
+    if (end(explode(".", $attachment['text'])) == 'patch') {
+      // Rather graceless insertion of an extra link inside the link that 
+      // comment-upload-attachments.tpl.php will make.
+      $variables['attachments'][$id]['text'] .= '</a> - <a class="patch-help" href="' . DRUPALORG_PATCH_HANDBOOK_URL . '">Get help with patches';
+    }
+  }
+}
