? mailhandler-post-save-signature-855312-13.patch
Index: mailhandler.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/mailhandler/Attic/mailhandler.module,v
retrieving revision 1.96.2.29
diff -u -p -r1.96.2.29 mailhandler.module
--- mailhandler.module	4 Jun 2010 12:16:11 -0000	1.96.2.29
+++ mailhandler.module	2 Aug 2010 13:10:25 -0000
@@ -309,11 +309,11 @@ function mailhandler_node_process_messag
 
   if ($node) {
     if ($node->type == 'comment') {
-      $nid = mailhandler_comment_submit($node, $header, $mailbox, $origbody);
+      $saved = mailhandler_comment_submit($node, $header, $mailbox, $origbody);
       $type = 'comment';
     }
     else {
-      $nid = mailhandler_node_submit($node, $header, $mailbox, $origbody);
+      $saved = mailhandler_node_submit($node, $header, $mailbox, $origbody);
       $type = 'node';
     }
   }
@@ -322,8 +322,10 @@ function mailhandler_node_process_messag
   foreach (module_list() as $name) {
     if (module_hook($name, 'mailhandler_post_save')) {
       $function = $name .'_mailhandler_post_save';
-      // Pass in the $nid (which could be a $cid, depending on $node->type)
-      $function($nid, $type);
+      // Pass in what's returned from saving the comment (cid) or node (object), the
+      // object type, and the original node object (which is the same as $saved in
+      // the case of saving a node).
+      $function($saved, $type, $node);
     }
   }
   
