r70405 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70404‎ | r70405 | r70406 >
Date:19:45, 3 August 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Added a few watchdog statements during queue consumption when pushing contribs into CiviCRM
Modified bootstrap level for drush script to allow drush to execute script as a specified user
Modified paths:
  • /civicrm/trunk/sites/all/modules/queue2civicrm/queue2civicrm.module (modified) (history)
  • /civicrm/trunk/sites/all/modules/queue2civicrm/queue_consume.drush.inc (modified) (history)

Diff [purge]

Index: civicrm/trunk/sites/all/modules/queue2civicrm/queue2civicrm.module
@@ -276,11 +276,17 @@
277277 'trxn_id' => strtoupper($msg['gateway']) . ' ' . $msg['gateway_txn_id'],
278278 'receive_date' => date('Y-m-d H:i:s', $msg['date']),
279279 'currency' => 'USD',
280 - 'source' => $msg['original_currency'] . ' ' . $msg['original_gross'],
281 - 'custom_45' => $msg['comment']
282 - );
283 - $contribution_result = &civicrm_contribution_add( $contribution );
284 - $contribution['id'] = $contribution_result['id'];
 280+ 'source' => $msg['original_currency'] . ' ' . $msg['original_gross'],
 281+ 'custom_45' => $msg['comment']
 282+ );
 283+
 284+ watchdog( 'queue2civicrm', 'Contribution array for civicrm_contribution_add(): ' . print_r($contribution, TRUE));
 285+
 286+ $contribution_result = &civicrm_contribution_add( $contribution );
 287+
 288+ watchdog( 'queue2civicrm', 'Contribution result from civicrm_contribution_add(): ' . print_r($contribution_result, TRUE));
 289+
 290+ $contribution['id'] = $contribution_result['id'];
285291
286292 // Send thank you email
287293 module_invoke_all('queue2civicrm_import', $contribution['id']);
Index: civicrm/trunk/sites/all/modules/queue2civicrm/queue_consume.drush.inc
@@ -17,7 +17,6 @@
1818 'Consumes items from a specified ActiveMQ queue and processes them into CiviCRM',
1919 'examples' => array( 'drush queue-consume' ),
2020 'aliases' => array( 'qc' ),
21 - 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL // fully bootstrap drupal, i think this is what we need...
2221 );
2322
2423 return $items;

Status & tagging log