Index: branches/ContactPageFundraiser/SpecialContact.php |
— | — | @@ -358,8 +358,11 @@ |
359 | 359 | |
360 | 360 | wfDebug( "$fname: success\n" ); |
361 | 361 | |
362 | | - $titleObj = SpecialPage::getTitleFor( "Contact" ); |
363 | | - $wgOut->redirect( "http://dev.donate.wikimedia.org/index.php/Donate/Support/en"); |
| 362 | + $returnto = Title::newFromText( $wgRequest->getVal( 'returnto' ) ); |
| 363 | + if( is_null( $returnto ) || !$returnto->isLocal() ) { |
| 364 | + $returnto = SpecialPage::getTitleFor( "Contact" ); |
| 365 | + } |
| 366 | + $wgOut->redirect( $returnto->getFullUrl() ); |
364 | 367 | wfRunHooks( 'ContactFromComplete', array( $to, $replyto, $subject, $this->text ) ); |
365 | 368 | } |
366 | 369 | } |