r81048 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81047‎ | r81048 | r81049 >
Date:19:51, 26 January 2011
Author:awjrichards
Status:deferred
Tags:
Comment:
Added requirement fro contribution API and suppressed output to the screen of curl call to OWA
Modified paths:
  • /civicrm/trunk/sites/all/modules/wmf_owa/wmf_owa.module (modified) (history)

Diff [purge]

Index: civicrm/trunk/sites/all/modules/wmf_owa/wmf_owa.module
@@ -49,6 +49,7 @@
5050 * @param unknown_type $objectRef
5151 */
5252 function wmf_owa_civicrm_post( $op, $objectName, $objectId, &$objectRef ) {
 53+ require_once 'api/v2/Contribute.php';
5354 // only continue if we're handling an updated contribution
5455 if ( $objectName != 'Contribution' || ( $objectName == 'Contribution' && $op != 'edit' ) ) {
5556 return;
@@ -172,7 +173,8 @@
173174 curl_setopt( $ch, CURLOPT_URL, $url_with_request );
174175 curl_setopt( $ch, CURLOPT_USERAGENT, "WMF Ecommerce web service 1.0" );
175176 curl_setopt( $ch, CURLINFO_HEADER_OUT, true ); // so we can track the request header
176 -
 177+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
 178+
177179 if ( !curl_exec( $ch )) {
178180 // log curl error curl_error( $ch );
179181 watchdog( 'wmf_owa',

Status & tagging log