diff -Naurx .svn comment_notify_old/comment_notify.info comment_notify/comment_notify.info
--- comment_notify_old/comment_notify.info	2008-05-14 20:03:36.000000000 -0400
+++ comment_notify/comment_notify.info	2008-05-25 01:48:17.000000000 -0400
@@ -1,10 +1,11 @@
 ; $Id: comment_notify.info,v 1.1.2.2 2008/01/19 12:49:05 greggles Exp $
 name = Comment Notify
 description = "Comment follow-up e-mail notification for anonymous as well as registered users."
-dependencies = comment
+dependencies[] = comment
+core=6.x
 
 ; Information added by drupal.org packaging script on 2008-05-15
-version = "5.x-1.x-dev"
+version = "6.x-1.x-dev"
 project = "comment_notify"
 datestamp = "1210809816"
 
diff -Naurx .svn comment_notify_old/comment_notify.module comment_notify/comment_notify.module
--- comment_notify_old/comment_notify.module	2008-05-14 10:07:15.000000000 -0400
+++ comment_notify/comment_notify.module	2008-05-25 01:48:17.000000000 -0400
@@ -35,21 +35,9 @@
 !uri');
 
 /**
- * Implementation of hook_help().
+ * Implementation of hook_form_alter to insert our checkbox, populate fields, and set validation hook.
  */
-function comment_notify_help($section) {
-  switch ($section) {
-    case 'admin/modules#description':
-      return t('Comment follow-up e-mail notification for anonymous and registered users.');
-      break;
-  }
-}
-
-/**
- * Insert our checkbox, and populate fields.
- * set validation hook.
- */
-function comment_notify_form_alter($form_id, &$form) {
+function comment_notify_form_alter(&$form, &$form_state, $form_id) {
   global $user;
 
   if ($form_id != 'comment_form') {
@@ -108,30 +96,24 @@
 /**
  * Implementation of hook_menu().
  */
-function comment_notify_menu($may_cache) {
+function comment_notify_menu() {
   $items = array();
-  global $user;
 
-  if ($may_cache) {
-    $items[] = array(
-      'path' => 'admin/settings/comment_notify',
-      'title' => t('Comment Notify'),
-      'callback' => 'drupal_get_form',
-      'description' => t('Configure settings for e-mails about new comment.'),
-      'callback arguments' => array('comment_notify_settings'),
-      'access' => user_access('Administer comment notify'),
-      'type' => MENU_NORMAL_ITEM
-    );
-  }
-  else {
-    $items[] = array(
-      'path' => 'comment_notify',
-      'title' => t('comment notify') ,
-      'callback' => 'comment_notify_page',
-      'access' => 1,
-      'type' => MENU_CALLBACK
-    );
-  }
+  $items['admin/settings/comment_notify'] = array(
+    'title' => 'Comment Notify',
+    'page callback' => 'drupal_get_form',
+    'description' => 'Configure settings for e-mails about new comment.',
+    'page arguments' => array('comment_notify_settings'),
+    'access arguments' => 'Administer comment notify',
+    'type' => MENU_NORMAL_ITEM
+  );
+  $items['comment_notify'] = array(
+    'title' => 'comment notify',
+    'page callback' => 'comment_notify_page',
+    'access' => TRUE,
+    'type' => MENU_CALLBACK
+  );
+
   return $items;
 }
 
@@ -155,15 +137,15 @@
           SET c.notify = 0
         WHERE u.uid = c.uid
           AND md5(concat(c.mail, ifnull(u.mail, u.init), c.uid, c.name, c.nid)) = '%s'",
-        $arg
+      $arg
       );
 
       drupal_set_message(t('Your comment follow-up notification for this post was disabled. Thanks.'));
       $title = t('Disabled comment follow-up notification feature for this post.');
       break;
     default;
-      $title = t('Comment Notify');
-      break;
+    $title = t('Comment Notify');
+    break;
   }
 
   drupal_set_title($title);
@@ -174,11 +156,11 @@
 /**
  * save our data.
  */
-function comment_notify_validate($form_id, $form_values) {
+function comment_notify_validate($form, &$form_state) {
 
-  if ($form_values['optin']) {
+  if ($form_state['values']['optin']) {
     foreach (array('optin') as $field) {
-      $_SESSION['comment_notify'][$field] = $form_values[$field];
+      $_SESSION['comment_notify'][$field] = $form_state['values'][$field];
     }
   }
   else {
@@ -237,15 +219,15 @@
 
 function _comment_notify_mailalert($comment) {
   $comment = (object) $comment;
-  global $locale;
+  global $language;
   global $base_url;
 
   $initial_locale = $locale;
 
-  if (function_exists('locale')) {
-    $languages = locale_supported_languages();
-    $languages = $languages['name'];
-  }
+  //  if (function_exists('locale')) {
+  //    $languages = locale_supported_languages();
+  //    $languages = $languages['name'];
+  //  }
 
   $nid = $comment->nid;
   $cid = $comment->cid;
@@ -263,13 +245,24 @@
 
   $from = variable_get('site_mail', ini_get('sendmail_from'));
 
-  $result = db_query('SELECT DISTINCT c.cid, u.init, c.uid, c.name, c.nid, IF(length(c.mail) < 1, ifnull(u.mail, u.init), c.mail) mail, c.uid, c.name, max(cid) cid, md5(concat(c.mail, ifnull(u.mail, u.init), c.uid, c.name, c.nid)) mymd5
-    FROM {comments} c LEFT OUTER JOIN {users} u ON u.uid = c.uid
-    WHERE nid = %d  AND notify = 1 AND c.status = 0
-      AND LENGTH(IF(LENGTH(c.mail) < 1, ifnull(u.mail, u.init), c.mail)) > 1
-      AND IF(LENGTH(c.mail) < 1, ifnull(u.mail, u.init), c.mail) like \'%@%.%\'
-    GROUP BY IF(LENGTH(c.mail) < 1, ifnull(u.mail, u.init), c.mail), c.name',
-    $nid
+  $result = debug_query('
+SELECT 
+	distinct uid,mail,name 
+FROM
+  (SELECT 
+  	c.uid,
+  	coalesce(if(length(u.name)=0,null,u.name),if(length(c.name)=0,null,c.name)) as name,
+  	coalesce(if(length(u.mail)=0,null,u.mail),if(length(c.mail)=0,null,c.mail),if(length(u.init)=0,null,u.init)) as mail
+  FROM comments c 
+  	LEFT OUTER JOIN users u ON u.uid = c.uid    
+  WHERE 
+  	nid = %d  AND 
+  	notify = 1 AND 
+  	c.status = 0
+  
+  ) as a
+',
+  $nid
   );
 
   $count = 0;
@@ -282,14 +275,11 @@
         $locale = $user->language;
       }
 
-      $subject = t('!site :: new comment for your post.', array('!site' => variable_get('site_name', 'drupal')));
-      $message = t(
-        variable_get('comment_notify_default_mailtext', DEFAULT_MAILTEXT),
-        array(
+      $params=array(
           '!commname' => $commname,
           '!commtext' => $commtext,
           '!commsubj' => $commsubj,
-          '!comment_url' => url('node/'. $nid, NULL, NULL, 1) .'#comment-'. $cid,
+          '!comment_url' => url('node/'. $nid, array('absolute' => 1, 'fragment' => 'comment-'. $cid)),
           '!node_title' =>  $node->title,
           '!node_teaser' => $node->teaser,
           '!mission' => variable_get('site_mission', ''),
@@ -299,28 +289,13 @@
           '!uri' => $base_url,
           '!uri_brief' => substr($base_url, strlen('http://')),
           '!date' => format_date(time()),
-          '!login_uri' => url('user', NULL, NULL, 1),
-          '!edit_uri' => url('user/'. $alert->uid .'/edit', NULL, NULL, 1),
-          '!link1' => url('comment_notify/disable/'. $alert->mymd5, NULL, NULL, 1)
-        )
+          '!login_uri' => url('user', array('absolute' => TRUE)),
+          '!edit_uri' => url('user/'. $alert->uid .'/edit', array('absolute' => TRUE)),
+          '!link1' => url('comment_notify/disable/'. $alert->mymd5, array('absolute' => TRUE))
       );
 
-      drupal_mail('comment_notify_mail', $alert->mail, $subject, $message, $from, array());
+      drupal_mail('comment_notify', 'format', $alert->mail,'',$params);
       $count++;
-
-      if ($alert->uid != 0) {
-        $watchdog_message = t('Notified: <a href="!url">@user_mail</a>', 
-          array('!url' => url('user/'. $alert->uid .'/edit'), '@user_mail' => $alert->mail)) ;
-
-      }
-      else {
-        $watchdog_message = t('Notified @user_mail', array('@user_mail' => $alert->mail));
-      }
-
-      // Add an entry to the watchdog log.
-      watchdog('comment_notify', $watchdog_message,
-        WATCHDOG_NOTICE, l(t('source comment'), 'node/'. $nid, NULL, NULL, 'comment-'. $alert->cid));
-
       // revert to previous (site default) locale
       $locale = $initial_locale;
     }
@@ -368,12 +343,21 @@
       <li>!edit_uri = uri to edit user profile
       <li>!link1 the QUICKLINK to disable future follow-up otifications for the user
       </ul>'
-    ),
+      ),
     '#default_value' => variable_get('comment_notify_default_mailtext', t(DEFAULT_MAILTEXT)),
     '#return_value' => 1,
     '#cols' => 80,
     '#rows' => 15
-  );
+      );
 
-  return system_settings_form($form);
+      return system_settings_form($form);
+}
+
+function comment_notify_mail($key, &$message, $params) {
+  error_log("machin");
+  $message['subject'] = t('!site :: new comment for your post.', array('!site' => variable_get('site_name', 'drupal')));
+  $message['body'][] = t(
+  variable_get('comment_notify_default_mailtext', DEFAULT_MAILTEXT),
+  $params
+  );
 }
diff -Naurx .svn comment_notify_old/comment_notify_patch_to_comment.patch comment_notify/comment_notify_patch_to_comment.patch
--- comment_notify_old/comment_notify_patch_to_comment.patch	2008-01-29 15:33:21.000000000 -0500
+++ comment_notify/comment_notify_patch_to_comment.patch	1969-12-31 19:00:00.000000000 -0500
@@ -1,17 +0,0 @@
-Index: comment.module
-===================================================================
-RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
-retrieving revision 1.520.2.12
-diff -u -p -r1.520.2.12 comment.module
---- comment.module	7 Nov 2007 08:03:30 -0000	1.520.2.12
-+++ comment.module	19 Jan 2008 13:13:33 -0000
-@@ -803,6 +803,9 @@ function comment_save($edit) {
-       if ($edit['status'] == COMMENT_NOT_PUBLISHED) {
-         drupal_set_message(t('Your comment has been queued for moderation by site administrators and will be published after approval.'));
-       }
-+      else {
-+	comment_invoke_comment($edit, 'publish');
-+      }
-       return $edit['cid'];
-     }
-     else {
