r76550 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76549‎ | r76550 | r76551 >
Date:00:03, 12 November 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Added some more logging and changed wfDebug statements to wfDebugLog in recaptcha lib
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/extras/recaptcha/recaptcha-php/recaptchalib.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/recaptcha/recaptcha-php/recaptchalib.php
@@ -124,9 +124,12 @@
125125 $http_request .= $req;
126126
127127 $response = '';
 128+ wfDebugLog( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha via fsock.' );
128129 if ( false == ( $fs = @fsockopen( $host, $port, $errno, $errstr, 10 ) ) ) {
 130+ wfDebugLog( 'payflowpro_gateway', 'Failed communicating with reCaptcha.' );
129131 die ( 'Could not open socket' );
130132 }
 133+ wfDebugLog( 'payflowpro_gateway', 'Finished communicating with reCaptcha.' );
131134
132135 fwrite( $fs, $http_request );
133136
@@ -165,11 +168,11 @@
166169
167170 // try up to three times
168171 for ( $i = 0; $i < RECAPTCHA_RETRY_LIMIT; $i++ ) {
169 - wfDebug( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha.' );
 172+ wfDebugLog( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha via cURL.' );
170173 $response = curl_exec( $ch );
171 - wfDebug( 'payflowpro_gateway', "Finished communicating with reCaptcha." );
 174+ wfDebugLog( 'payflowpro_gateway', "Finished communicating with reCaptcha." );
172175 if ( $response ) {
173 - wfDebug( 'payflowpro_gateway', 'Response from reCaptcha: ' . $response );
 176+ wfDebugLog( 'payflowpro_gateway', 'Response from reCaptcha: ' . $response );
174177 break;
175178 }
176179 }
@@ -184,7 +187,7 @@
185188 * the user entered the correct values.
186189 */
187190 if ( !$response ) {
188 - wfDebug( 'payflowpro_gateway', 'Failed communicating with reCaptcha: ' . curl_error( $ch ) );
 191+ wfDebugLog( 'payflowpro_gateway', 'Failed communicating with reCaptcha: ' . curl_error( $ch ) );
189192 $response = "true\r\n\r\ntrue";
190193 }
191194

Status & tagging log