r100487 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100486‎ | r100487 | r100488 >
Date:02:14, 22 October 2011
Author:reedy
Status:ok
Tags:fundraising 
Comment:
Trim trailing whitespace

Flesh out authors
Modified paths:
  • /trunk/extensions/DonationInterface/donationinterface.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/donationinterface.php
@@ -5,7 +5,7 @@
66 *
77 * To install the DontaionInterface extension, put the following line in LocalSettings.php:
88 * require_once( "\$IP/extensions/DonationInterface/donationinterface.php" );
9 - *
 9+ *
1010 */
1111
1212
@@ -21,7 +21,7 @@
2222 // Extension credits that will show up on Special:Version
2323 $wgExtensionCredits['specialpage'][] = array(
2424 'name' => 'Donation Interface',
25 - 'author' => 'Katie Horn',
 25+ 'author' => array( 'Katie Horn', 'Ryan Kaldari' , 'Arthur Richards', 'Jeremy Postlethwaite' ),
2626 'version' => '1.0.0',
2727 'descriptionmsg' => 'donationinterface-desc',
2828 'url' => 'http://www.mediawiki.org/wiki/Extension:DonationInterface',
@@ -30,12 +30,12 @@
3131 $donationinterface_dir = dirname( __FILE__ ) . '/';
3232
3333 /**
34 - * Figure out what we've got enabled.
 34+ * Figure out what we've got enabled.
3535 */
3636
37 -$optionalParts = array( //define as fail closed. This variable will be unset before we leave this file.
38 - 'Extras' => false, //this one gets set in the next loop, so don't bother.
39 - 'CustomFilters' => false, //Also gets set in the next loop.
 37+$optionalParts = array( //define as fail closed. This variable will be unset before we leave this file.
 38+ 'Extras' => false, //this one gets set in the next loop, so don't bother.
 39+ 'CustomFilters' => false, //Also gets set in the next loop.
4040 'Stomp' => false,
4141 'ConversionLog' => false, //this is definitely an Extra
4242 'Minfraud' => false, //this is definitely an Extra
@@ -45,7 +45,7 @@
4646 'ReferrerFilter' => false, //extra
4747 'SourceFilter' => false, //extra
4848 'Minfraud_as_filter' => false, //extra
49 -
 49+
5050 );
5151
5252 foreach ($optionalParts as $subextension => $enabled){
@@ -53,26 +53,26 @@
5454 global $$globalname;
5555 if ( isset( $$globalname ) && $$globalname === true ) {
5656 $optionalParts[$subextension] = true;
57 - //this is getting annoying.
 57+ //this is getting annoying.
5858 if ( $subextension === 'ReferrerFilter' ||
5959 $subextension === 'SourceFilter' ||
6060 $subextension === 'Minfraud_as_filter' ||
6161 $subextension === 'ConversionLog' ||
6262 $subextension === 'Minfraud' ||
6363 $subextension === 'Recaptcha' ) {
64 -
 64+
6565 //we have extras
6666 $optionalParts['Extras'] = true;
67 -
 67+
6868 if ( $subextension === 'ReferrerFilter' ||
6969 $subextension === 'SourceFilter' ||
7070 $subextension === 'Minfraud_as_filter' ){
71 -
72 - //and at least one of them is a custom filter.
 71+
 72+ //and at least one of them is a custom filter.
7373 $optionalParts['CustomFilters'] = true;
7474 }
7575 }
76 -
 76+
7777 }
7878 }
7979
@@ -124,7 +124,7 @@
125125 $wgAutoloadClasses['activemq_stomp'] = $donationinterface_dir . 'activemq_stomp/activemq_stomp.php'; # Tell MediaWiki to load the extension body.
126126 }
127127
128 -//Extras classes - required for ANY optional class that is considered an "extra".
 128+//Extras classes - required for ANY optional class that is considered an "extra".
129129 if ($optionalParts['Extras'] === true){
130130 $wgAutoloadClasses['Gateway_Extras'] = $donationinterface_dir . "extras/extras.body.php";
131131 }
@@ -173,7 +173,7 @@
174174 * Global form dir and RapidHTML whitelist
175175 */
176176 $wgDonationInterfaceHtmlFormDir = dirname( __FILE__ ) . "/gateway_forms/rapidhtml/html";
177 -//ffname is the $key from now on.
 177+//ffname is the $key from now on.
178178 $wgDonationInterfaceAllowedHtmlForms = array(
179179 'demo' => $wgDonationInterfaceHtmlFormDir . "/demo.html",
180180 'globalcollect_test' => $wgDonationInterfaceHtmlFormDir . "/globalcollect_test.html",
@@ -183,17 +183,17 @@
184184
185185 /**
186186 * The URL to redirect a transaction to PayPal
187 - * This should probably point to ContributionTracking.
 187+ * This should probably point to ContributionTracking.
188188 */
189189 $wgDonationInterfacePaypalURL = '';
190190 $wgDonationInterfaceRetrySeconds = 5;
191191
192 -//all of the following variables make sense to override directly,
193 -//or change "DonationInterface" to the gateway's id to override just for that gateway.
 192+//all of the following variables make sense to override directly,
 193+//or change "DonationInterface" to the gateway's id to override just for that gateway.
194194 //for instance: To override $wgDonationInterfaceUseSyslog just for GlobalCollect, add
195195 // $wgGolbalCollectGatewayUseSyslog = true
196 -// to LocalSettings.
197 -//
 196+// to LocalSettings.
 197+//
198198
199199 $wgDonationInterfaceDisplayDebug = false;
200200 $wgDonationInterfaceUseSyslog = false;
@@ -249,14 +249,14 @@
250250 $wgDonationInterfaceSMaxAge = 6000;
251251
252252 /**
253 - * Configure price cieling and floor for valid contribution amount. Values
 253+ * Configure price cieling and floor for valid contribution amount. Values
254254 * should be in USD.
255255 */
256256 $wgDonationInterfacePriceFloor = '1.00';
257257 $wgDonationInterfacePriceCeiling = '10000.00';
258258
259259 /**
260 - * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime.
 260+ * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime.
261261 */
262262 //$wgDonationInterfaceThankYouPage = 'https://wikimediafoundation.org/wiki/Thank_You';
263263 $wgDonationInterfaceThankYouPage = 'Donate-thanks';
@@ -267,11 +267,11 @@
268268 if ( $optionalParts['GlobalCollect'] === true ){
269269 $wgGlobalCollectGatewayURL = 'https://ps.gcsip.nl/wdl/wdl';
270270 $wgGlobalCollectGatewayTestingURL = 'https://'; // GlobalCollect testing URL
271 -
 271+
272272 $wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID
273 -
 273+
274274 $wgGlobalCollectGatewayHtmlFormDir = $donationinterface_dir . 'globalcollect_gateway/forms/html';
275 - //this really should be redefined in LocalSettings.
 275+ //this really should be redefined in LocalSettings.
276276 $wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
277277 }
278278
@@ -279,25 +279,25 @@
280280 if ( $optionalParts['PayflowPro'] === true ){
281281 $wgPayflowProGatewayURL = 'https://payflowpro.paypal.com';
282282 $wgPayflowProGatewayTestingURL = 'https://pilot-payflowpro.paypal.com'; // Payflow testing URL
283 -
 283+
284284 $wgPayflowProGatewayPartnerID = ''; // PayPal or original authorized reseller
285285 $wgPayflowProGatewayVendorID = ''; // paypal merchant login ID
286286 $wgPayflowProGatewayUserID = ''; // if one or more users are set up, authorized user ID, else same as VENDOR
287287 $wgPayflowProGatewayPassword = ''; // merchant login password
288 -
 288+
289289 $wgPayflowProGatewayHtmlFormDir = $donationinterface_dir . 'payflowpro_gateway/forms/html';
290 - //this really should be redefined in LocalSettings.
 290+ //this really should be redefined in LocalSettings.
291291 $wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
292292 }
293293
294294 //Stomp globals
295295 if ($optionalParts['Stomp'] === true){
296296 $wgStompServer = "";
297 - //$wgStompQueueName = ""; //only set this with an actual value. Default is unset.
298 - //$wgPendingStompQueueName = ""; //only set this with an actual value. Default is unset.
 297+ //$wgStompQueueName = ""; //only set this with an actual value. Default is unset.
 298+ //$wgPendingStompQueueName = ""; //only set this with an actual value. Default is unset.
299299 }
300300
301 -//Extras globals - required for ANY optional class that is considered an "extra".
 301+//Extras globals - required for ANY optional class that is considered an "extra".
302302 if ($optionalParts['Extras'] === true){
303303 $wgDonationInterfaceExtrasLog = '';
304304 }
@@ -311,7 +311,7 @@
312312 'challenge' => array( -1, -1 ),
313313 'reject' => array( -1, -1 ),
314314 );
315 -
 315+
316316 /**
317317 * A value for tracking the 'riskiness' of a transaction
318318 *
@@ -365,7 +365,7 @@
366366 * advantage of sharing minFraud info with other filters.
367367 */
368368 $wgMinFraudStandalone = TRUE;
369 -
 369+
370370 }
371371
372372 //Minfraud as Filter globals
@@ -472,7 +472,7 @@
473473 }
474474
475475 /**
476 - * APIS
 476+ * APIS
477477 */
478478 // enable the API
479479 $wgAPIModules['donate'] = 'DonationApi';
@@ -486,7 +486,7 @@
487487
488488
489489 /**
490 - * ADDITIONAL MAGICAL GLOBALS
 490+ * ADDITIONAL MAGICAL GLOBALS
491491 */
492492
493493 // Resource modules
@@ -513,7 +513,7 @@
514514 );
515515
516516 // form validation resource
517 -//TODO: Move this somewhere gateway-agnostic.
 517+//TODO: Move this somewhere gateway-agnostic.
518518 $wgResourceModules[ 'pfp.form.core.validate' ] = array(
519519 'scripts' => 'validate_input.js',
520520 'dependencies' => 'pfp.form.core.pfp_css',
@@ -522,8 +522,8 @@
523523 );
524524
525525 // form placeholders
526 -//TODO: Move this somewhere gateway-agnostic.
527 -$wgResourceModules[ 'pfp.form.core.placeholders' ] = array(
 526+//TODO: Move this somewhere gateway-agnostic.
 527+$wgResourceModules[ 'pfp.form.core.placeholders' ] = array(
528528 'scripts' => 'form_placeholders.js',
529529 'dependencies' => 'pfp.form.core.validate',
530530 'messages' => array(
@@ -548,7 +548,7 @@
549549 ) + $wgResourceTemplate;
550550
551551 // API JS
552 -//TODO: Either move this somewhere gateway-agnostic, or move it to the pfp installer section.
 552+//TODO: Either move this somewhere gateway-agnostic, or move it to the pfp installer section.
553553 $wgResourceModules[ 'pfp.form.core.api' ] = array(
554554 'scripts' => 'pfp_api_controller.js',
555555 'localBasePath' => $donationinterface_dir . 'payflowpro_gateway',
@@ -556,7 +556,7 @@
557557 );
558558
559559 // Logo link override
560 -//TODO: Move this somewhere gateway-agnostic.
 560+//TODO: Move this somewhere gateway-agnostic.
561561 $wgResourceModules[ 'pfp.core.logolink_override' ] = array(
562562 'scripts' => 'logolink_override.js',
563563 'localBasePath' => $donationinterface_dir . 'payflowpro_gateway',
@@ -587,7 +587,7 @@
588588 }
589589
590590 //Minfraud magical globals
591 -if ( $optionalParts['Minfraud'] === true ){ //We do not want this in filter mode.
 591+if ( $optionalParts['Minfraud'] === true ){ //We do not want this in filter mode.
592592 $wgExtensionFunctions[] = 'efMinFraudSetup';
593593 }
594594

Status & tagging log