Index: trunk/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php |
— | — | @@ -103,17 +103,21 @@ |
104 | 104 | */ |
105 | 105 | function getDeclinedResultPage() { |
106 | 106 | global $wgOut; |
| 107 | + |
| 108 | + $displayData = $this->adapter->getDisplayData(); |
107 | 109 | $failpage = $this->adapter->getGlobal( 'FailPage' ); |
108 | 110 | |
109 | 111 | if ( $failpage ) { |
110 | | - $wgOut->redirect( $failpage . "/" . $data['language'] ); |
| 112 | + $wgOut->redirect( $failpage . "/" . $displayData['language'] ); |
111 | 113 | } else { |
112 | 114 | // general decline message |
113 | 115 | $declinedDefault = wfMsg( 'php-response-declined' ); |
114 | 116 | |
115 | | - $displayData = $this->adapter->getDisplayData(); |
| 117 | + // The page we're going to send them back to. |
| 118 | + // TODO: figure out something better so we aren't expanding the URL after every attempt. |
116 | 119 | $referrer = $displayData['referrer']; |
117 | 120 | |
| 121 | + // Tack on some data so that we can pre-populate the fields |
118 | 122 | $queryArray = array ( |
119 | 123 | 'fname' => $displayData['fname'], |
120 | 124 | 'lname' => $displayData['lname'], |
— | — | @@ -129,7 +133,6 @@ |
130 | 134 | 'error' => $declinedDefault, |
131 | 135 | ); |
132 | 136 | |
133 | | - // TODO: figure out something better so we aren't expanding the URL after every attempt. |
134 | 137 | $returnto = wfAppendQuery( htmlspecialchars_decode( $referrer ), $queryArray ); |
135 | 138 | |
136 | 139 | // Return the referrer URL with the data included in the query string |