r78630 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78629‎ | r78630 | r78631 >
Date:18:59, 20 December 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Added additional info to module_invoke_all() call in queue2civicrm to make invocations more flexible (in preperation for adding the ability to handle 'premiums')
Modified paths:
  • /civicrm/trunk/sites/all/modules/queue2civicrm/queue2civicrm.module (modified) (history)
  • /civicrm/trunk/sites/all/modules/thank_you/thank_you.module (modified) (history)

Diff [purge]

Index: civicrm/trunk/sites/all/modules/thank_you/thank_you.module
@@ -231,9 +231,10 @@
232232 return system_settings_form($form);
233233 }
234234
235 -function thank_you_queue2civicrm_import( $contribution_id ) {
236 - watchdog('thank_you', 'Calling thank you function for contribution: ' . $contribution_id . '<pre>' . check_plain(print_r($message_debug, TRUE)) . '</pre>');
237 - thank_you_send( $contribution_id );
 235+function thank_you_queue2civicrm_import( $contribution_info ) {
 236+ $contribution_id = $contribution_info[ 'contribution_id' ];
 237+ watchdog('thank_you', 'Calling thank you function for contribution: ' . $contribution_id . '<pre>' . check_plain(print_r($message_debug, TRUE)) . '</pre>');
 238+ thank_you_send( $contribution_id );
238239 }
239240
240241 function thank_you_mail_send($mailkey, $to, $subject, $body, $from = NULL, $headers = array()) {
Index: civicrm/trunk/sites/all/modules/queue2civicrm/queue2civicrm.module
@@ -348,9 +348,16 @@
349349 'contact_id' => $contact['id']
350350 );
351351 $tag_result = &civicrm_entity_tag_add( $tag );
352 -
 352+
 353+ // construct an array of useful info to invocations of queue2civicrm_import
 354+ $contribution_info = array(
 355+ 'contribution_id' => $contribution['id'],
 356+ 'contact_id' => $contact['id'],
 357+ 'msg' => $msg,
 358+ );
 359+
353360 // Send thank you email, other post-import things
354 - module_invoke_all('queue2civicrm_import', $contribution['id']);
 361+ module_invoke_all( 'queue2civicrm_import', $contribution_info );
355362
356363
357364 return TRUE;

Status & tagging log