Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -116,9 +116,16 @@ |
117 | 117 | unset( $data['referrer'] ); |
118 | 118 | $data['amount'] = $data['amount']/100; |
119 | 119 | $data['error'] = $declinedDefault; |
| 120 | + $params = wfArrayToCGI( $data ); |
120 | 121 | |
121 | | - $params = wfArrayToCGI( $data ); |
122 | | - $returnto = htmlspecialchars_decode( $referrer ) . '&' . $params; |
| 122 | + // Make sure the referrer has a query string |
| 123 | + if ( strpos( $referrer, '?' ) === false ) { |
| 124 | + $returnto = htmlspecialchars_decode( $referrer ) . '?' . $params; |
| 125 | + } else { |
| 126 | + $returnto = htmlspecialchars_decode( $referrer ) . '&' . $params; |
| 127 | + } |
| 128 | + |
| 129 | + // Return the referrer URL with the data included in the query string |
123 | 130 | return $returnto; |
124 | 131 | } |
125 | 132 | } |