Index: modules/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment.module,v
retrieving revision 1.248
diff -u -r1.248 comment.module
--- modules/comment.module	2 Jun 2004 19:01:40 -0000	1.248
+++ modules/comment.module	3 Jun 2004 03:54:10 -0000
@@ -927,13 +927,16 @@
 
 function comment_admin_edit($id) {
 
-  $result = db_query('SELECT c.*, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2', $id);
+  $result = db_query('SELECT c.*, u.name AS registered_name, u.mail AS registered_mail, u.uid FROM {comments} c INNER JOIN {users} u ON c.uid = u.uid WHERE c.cid = %d AND c.status != 2', $id);
   $comment = db_fetch_object($result);
   $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name;
+  $comment->mail = $comment->registered_mail ? $comment->registered_mail : $comment->mail;  
+
   $comment = drupal_unpack($comment);
 
   if ($comment) {
     $form .= form_item(t("Author"), format_name($comment));
+    $form .= form_item(t("Mail"), ($comment->mail ? $comment->mail : "No Mail Specified"));
     $form .= form_textfield(t("Subject"), 'subject', $comment->subject, 70, 128);
     $form .= form_textarea(t("Comment"), 'comment', $comment->comment, 70, 15, filter_tips_short());
     $form .= form_radios(t("Status"), 'status', $comment->status, array("published", "not published"));
@@ -1011,15 +1014,16 @@
     array("data" => t("operations"), "colspan" => 2)
   );
 
-  $sql = 'SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, u.name AS registered_name, u.uid FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. check_query($status);
+  $sql = 'SELECT c.subject, c.nid, c.cid, c.comment, c.timestamp, c.status, c.name, c.homepage, c.mail, u.name AS registered_name, u.uid, u.mail AS registered_mail FROM {comments} c INNER JOIN {users} u ON u.uid = c.uid WHERE c.status = '. check_query($status);
   $sql .= tablesort_sql($header);
   $result = pager_query($sql,  50);
 
   while ($comment = db_fetch_object($result)) {
     $comment->name = $comment->registered_name ? $comment->registered_name : $comment->name;
+    $comment->mail = $comment->registered_mail ? $comment->registered_mail : $comment->mail;
     $rows[] = array(
         l($comment->subject, "node/view/$comment->nid/$comment->cid", array("title" => htmlspecialchars(truncate_utf8($comment->comment, 128))), NULL, "comment-$comment->cid") ." ". (node_is_new($comment->nid, $comment->timestamp) ? theme("mark") : ""),
-        format_name($comment),
+        format_name($comment) . "<br>&nbsp;&nbsp;" . ($comment->mail ? "<a href=\"mailto:" . $comment->mail . "\">Mail</a>" : "No Mail"),
         ($comment->status == 0 ? t("published") : t("not published")),
         format_date($comment->timestamp, "small"),
         l(t("edit comment"), "admin/comment/edit/$comment->cid"),
