r100178 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100177‎ | r100178 | r100179 >
Date:22:30, 18 October 2011
Author:khorn
Status:ok
Tags:fundraising 
Comment:
Merging the fundraising branch of DonationInterface back into trunk.
Had to fix the class names in the form classes, which also should have changed.
As this is a mid-merge commit, the extension will be broken until the merge is completed.
Modified paths:
  • /trunk/extensions/DonationInterface/gateway_forms/Form.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/OneStepTwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/RapidHtml.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/SingleColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter2.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter3.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter4.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoColumnPayPal.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumn.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter2.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetterCA.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremium.php (modified) (history)
  • /trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter2.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter2 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter2 extends Gateway_Form_OneStepTwoColumn {
55 public $paypal = false; // true for paypal only version
66
77 public function __construct( &$form_data, &$form_errors, &$gateway ) {
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter3.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter3 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter3 extends Gateway_Form_OneStepTwoColumn {
55 public $paypal = false; // true for paypal only version
66
77 public function __construct( &$form_data, &$form_errors, &$gateway ) {
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter4.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter4 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter4 extends Gateway_Form_OneStepTwoColumn {
55 public $paypal = false; // true for paypal only version
66
77 public function __construct( &$form_data, &$form_errors, &$gateway ) {
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter5.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter5 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter5 extends Gateway_Form_OneStepTwoColumn {
55
66 public function __construct( &$form_data, &$form_errors, &$gateway ) {
77 global $wgScriptPath;
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter6.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter6 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter6 extends Gateway_Form_OneStepTwoColumn {
55
66 public function __construct( &$form_data, &$form_errors, &$gateway ) {
77 global $wgScriptPath;
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnLetter extends PayflowProGateway_Form_TwoStepTwoColumn {
 4+class Gateway_Form_TwoStepTwoColumnLetter extends Gateway_Form_TwoStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgScriptPath;
77
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter7.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter7 extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter7 extends Gateway_Form_OneStepTwoColumn {
55
66 public function __construct( &$form_data, &$form_errors, &$gateway ) {
77 global $wgScriptPath;
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnPayPal.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnPayPal extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnPayPal extends Gateway_Form_OneStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 parent::__construct( $form_data, $form_errors, $gateway );
77 }
Index: trunk/extensions/DonationInterface/gateway_forms/SingleColumn.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_SingleColumn extends PayflowProGateway_Form_TwoColumnLetter {
 4+class Gateway_Form_SingleColumn extends Gateway_Form_TwoColumnLetter {
55
66 public function __construct( &$form_data, &$form_errors, &$gateway ) {
77 global $wgScriptPath;
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetterCA.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnLetterCA extends PayflowProGateway_Form_TwoStepTwoColumn {
 4+class Gateway_Form_TwoStepTwoColumnLetterCA extends Gateway_Form_TwoStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgScriptPath;
77
Index: trunk/extensions/DonationInterface/gateway_forms/Form.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -abstract class PayflowProGateway_Form {
 4+abstract class Gateway_Form {
55
66 /**
77 * Defines if we are in test mode
@@ -277,7 +277,7 @@
278278 * @return string The entire HTML select element for the state dropdown list
279279 */
280280 public function generateStateDropdown() {
281 - require_once( dirname( __FILE__ ) . '/../includes/stateAbbreviations.inc' );
 281+ require_once( dirname( __FILE__ ) . '/includes/stateAbbreviations.inc' );
282282
283283 $states = statesMenuXML();
284284
Index: trunk/extensions/DonationInterface/gateway_forms/TwoColumnLetter.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoColumnLetter extends PayflowProGateway_Form_OneStepTwoColumn {
 4+class Gateway_Form_TwoColumnLetter extends Gateway_Form_OneStepTwoColumn {
55 public $paypal = false; // true for paypal only version
66
77 public function __construct( &$form_data, &$form_errors, &$gateway ) {
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremium.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnPremium extends PayflowProGateway_Form_TwoStepTwoColumn {
 4+class Gateway_Form_TwoStepTwoColumnPremium extends Gateway_Form_TwoStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgScriptPath;
77
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumn.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumn extends PayflowProGateway_Form {
 4+class Gateway_Form_TwoStepTwoColumn extends Gateway_Form {
55
66 public function __construct( &$form_data, &$form_errors, &$gateway ) {
77 global $wgOut;
@@ -14,7 +14,7 @@
1515 global $wgOut;
1616 $wgOut->addModules( 'pfp.form.core.placeholders' );
1717 }
18 -
 18+
1919 /**
2020 * Required method for constructing the entire form
2121 *
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter2.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnLetter2 extends PayflowProGateway_Form_TwoStepTwoColumnLetter {
 4+class Gateway_Form_TwoStepTwoColumnLetter2 extends Gateway_Form_TwoStepTwoColumnLetter {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgScriptPath;
77
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnLetter3.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnLetter3 extends PayflowProGateway_Form_TwoStepTwoColumn {
 4+class Gateway_Form_TwoStepTwoColumnLetter3 extends Gateway_Form_TwoStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgExtensionAssetsPath;
77
@@ -28,27 +28,27 @@
2929 if ( $( '#fname' ).val() == '') {
3030 $( '#fname' ).css( 'color', '#999999' );
3131 $( '#fname' ).val( '$first' );
32 - }
 32+ }
3333 if ( $( '#lname' ).val() == '') {
3434 $( '#lname' ).css( 'color', '#999999' );
3535 $( '#lname' ).val( '$last' );
36 - }
 36+ }
3737 if ( $( '#street' ).val() == '') {
3838 $( '#street' ).css( 'color', '#999999' );
3939 $( '#street' ).val( '$street' );
40 - }
 40+ }
4141 if ( $( '#city' ).val() == '' ) {
4242 $( '#city' ).css( 'color', '#999999' );
4343 $( '#city' ).val( '$city' );
44 - }
 44+ }
4545 if ( $( '#zip' ).val() =='') {
4646 $( '#zip' ).css( 'color', '#999999' );
4747 $( '#zip' ).val( '$zip' );
48 - }
 48+ }
4949 if ( $( '#emailAdd' ).val() == '') {
5050 $( '#emailAdd' ).css( 'color', '#999999' );
5151 $( '#emailAdd' ).val( '$email' );
52 - }
 52+ }
5353 });
5454 })(jQuery);
5555
Index: trunk/extensions/DonationInterface/gateway_forms/RapidHtml.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_RapidHtml extends PayflowProGateway_Form {
 4+class Gateway_Form_RapidHtml extends Gateway_Form {
55
66 /**
77 * Full path of HTML form to load
@@ -88,7 +88,7 @@
8989 if ( $country != '' ){
9090 try{
9191 $country_based = $wgRequest->getText( 'ffname', 'default' ) . '-' . $country;
92 - // set html-escaped filename.
 92+ // set html-escaped filename.
9393 $this->set_html_file_path( htmlspecialchars( $country_based ));
9494 } catch ( MWException $mwe ) {
9595 // country-specific file does not exist, set html-escaped filename.
@@ -98,7 +98,7 @@
9999 // set html-escaped filename.
100100 $this->set_html_file_path( htmlspecialchars( $wgRequest->getText( 'ffname', 'default' )));
101101 }
102 -
 102+
103103 // fix general form error messages so it's not an array of msgs
104104 if ( is_array( $form_errors['general'] ) && count( $form_errors['general'] ) ) {
105105 $general_errors = "";
@@ -141,7 +141,7 @@
142142 * This is a hack and should be replaced with something more performant.
143143 */
144144 $form = $html;
145 -
 145+
146146 // handle form action
147147 $form = str_replace( "@action", $this->getNoCacheAction(), $form );
148148
@@ -157,7 +157,7 @@
158158 }
159159 $form = str_replace( $token, $replace, $form );
160160 }
161 -
 161+
162162 // @fixme why do some errors have HTML in them
163163 // replace errors|escape with escaped versions
164164 $escape_error_tokens = array();
@@ -269,7 +269,7 @@
270270
271271 $this->html_file_path = $allowedForms[$file_name];
272272 }
273 -
 273+
274274 /**
275275 * Load API js if this form needs to support cacheing
276276 */
@@ -277,6 +277,6 @@
278278 global $wgRequest;
279279 if ( $wgRequest->getText( '_cache_', false )) {
280280 $this->loadApiJs();
281 - }
 281+}
282282 }
283283 }
Index: trunk/extensions/DonationInterface/gateway_forms/TwoStepTwoColumnPremiumUS.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_TwoStepTwoColumnPremiumUS extends PayflowProGateway_Form_TwoStepTwoColumn {
 4+class Gateway_Form_TwoStepTwoColumnPremiumUS extends Gateway_Form_TwoStepTwoColumn {
55 public function __construct( &$form_data, &$form_errors, &$gateway ) {
66 global $wgScriptPath;
77
Index: trunk/extensions/DonationInterface/gateway_forms/OneStepTwoColumn.php
@@ -1,6 +1,6 @@
22 <?php
33
4 -class PayflowProGateway_Form_OneStepTwoColumn extends PayflowProGateway_Form {
 4+class Gateway_Form_OneStepTwoColumn extends Gateway_Form {
55 public $paypal = false; // true for paypal only version
66
77 public function __construct( &$form_data, &$form_errors, &$gateway ) {

Status & tagging log