Index: trunk/extensions/DonationInterface/payflowpro_gateway/forms/RapidHtml.php |
— | — | @@ -96,6 +96,9 @@ |
97 | 97 | } |
98 | 98 | $form_errors[ 'general' ] = $general_errors; |
99 | 99 | } |
| 100 | + |
| 101 | + // if this form needs to support squid cacheing, handle the magic |
| 102 | + $this->handle_cacheability(); |
100 | 103 | } |
101 | 104 | |
102 | 105 | /** |
— | — | @@ -249,4 +252,14 @@ |
250 | 253 | |
251 | 254 | $this->html_file_path = $full_path; |
252 | 255 | } |
| 256 | + |
| 257 | + /** |
| 258 | + * Load API js if this form needs to support cacheing |
| 259 | + */ |
| 260 | + public function handle_cacheability() { |
| 261 | + global $wgRequest; |
| 262 | + if ( $wgRequest->getText( '_cache_', false )) { |
| 263 | + $this->loadApiJs(); |
| 264 | + } |
| 265 | + } |
253 | 266 | } |