r75563 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75562‎ | r75563 | r75564 >
Date:18:34, 27 October 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Fixed logging for request header sent by curl so it actually works :)
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
@@ -198,11 +198,8 @@
199199 $ch = curl_init();
200200 curl_setopt( $ch, CURLOPT_URL, $owa_log_url . "?". http_build_query( $query_params ));
201201 curl_setopt( $ch, CURLOPT_USERAGENT, "WMF Ecommerce web service 1.0" );
 202+ curl_setopt( $ch, CURLINFO_HEADER_OUT, true ); // so we can track the request header
202203
203 - watchdog( 'wmf_owa', 'Request string sent to OWA: %header_out',
204 - array( '%header_out' => curl_getinfo( $ch, CURLINFO_HEADER_OUT ) ),
205 - WATCHDOG_DEBUG );
206 -
207204 if ( !curl_exec( $ch )) {
208205 // log curl error curl_error( $ch );
209206 watchdog( 'wmf_owa',
@@ -213,6 +210,12 @@
214211 watchdog( 'wmf_owa', 'Posted to OWA for contribution_id: %contribution_id', array( '%contribution_id' => $query_params[ 'owa_ct_order_id' ] ) ); // notice
215212 watchdog( 'wmf_owa', 'Posted to OWA with query params: %query_params', array( '%query_params' => print_r( $query_params, true ) ), WATCHDOG_DEBUG ); //debug
216213 }
 214+
 215+ $curl_req_header = curl_getinfo( $ch, CURLINFO_HEADER_OUT );
 216+
 217+ watchdog( 'wmf_owa', 'Request string sent to OWA: %header_out',
 218+ array( '%header_out' => $curl_req_header ),
 219+ WATCHDOG_DEBUG );
217220
218221 curl_close( $ch );
219222 return;

Status & tagging log