Index: commentrss.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/commentrss/commentrss.module,v
retrieving revision 1.12.2.2.4.1
diff -u -p -r1.12.2.2.4.1 commentrss.module
--- commentrss.module	29 Apr 2008 13:30:55 -0000	1.12.2.2.4.1
+++ commentrss.module	29 Apr 2008 14:18:27 -0000
@@ -172,7 +172,8 @@ function commentrss_feed_node($nid = NUL
       'n.nid',
       '',
       'n.nid = %d AND',
-      $node->nid
+      $node->nid,
+      FALSE
     );
     // Fill channel information based on node details.
     $channel = array(
@@ -271,16 +272,18 @@ function commentrss_format_feed($items, 
  *   Filtering SQL fragment.
  * @param $param
  *   Single parameter to use with an optional placeholder in the $where clause.
+ * @param $include_node_title
+ *   Include node title above comment body.
  * @return
  *   Formatted XML of RSS items generated.
  */
-function commentrss_format_items($nidselector, $joins = '', $where = '', $param = NULL) {
+function commentrss_format_items($nidselector, $joins = '', $where = '', $param = NULL, $include_node_title = TRUE) {
   global $base_url;
 
   $items = '';
 
   // Build SQL query from the passed elements.
-  $SQL = 'SELECT '. $nidselector .', c.cid, c.subject, c.comment, c.timestamp, c.uid, c.name, c.format, u.name username FROM {node} n ' . $joins . ' INNER JOIN {comments} c ON c.nid = n.nid INNER JOIN {users} u ON c.uid = u.uid WHERE ' . $where . ' n.status = 1 AND c.status = %d ORDER BY c.timestamp DESC';
+  $SQL = 'SELECT '. $nidselector .', c.cid, c.subject, c.comment, c.timestamp, c.uid, c.name, c.format, u.name username, n.title FROM {node} n '. $joins .' INNER JOIN {comments} c ON c.nid = n.nid INNER JOIN {users} u ON c.uid = u.uid WHERE '. $where .' n.status = 1 AND c.status = %d ORDER BY c.timestamp DESC';
 
   // Add passed query parameter; plus we are looking for published comments.
   $params = isset($param) ? array($param) : array();
@@ -317,10 +320,17 @@ function commentrss_format_items($nidsel
     );
     $link = url('node/'. $comment->nid, NULL, 'comment-'. $comment->cid, TRUE);
 
+    // Build up item content with node title if required.
+    $content = '';
+    if ($include_node_title) {
+      $content = '<p>'. t('In reply to <a href="@url">@title</a>', array('@url' => url('node/'. $comment->nid), '@title' => $comment->title)) .":</p>\n\n";
+    }
+    $content .= check_markup($comment->comment, $comment->format, FALSE);
+    
     // Format RSS item with input format used on comment. The format
     // was validated previously and the visitor might not have access to that,
     // so skip the format validation in check_markup() itself.
-    $items .= format_rss_item($comment->subject, $link, check_markup($comment->comment, $comment->format, FALSE), $extra);
+    $items .= format_rss_item($comment->subject, $link, $content, $extra);
   }
   return $items;
 }
