r43097 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43096‎ | r43097 | r43098 >
Date:22:39, 2 November 2008
Author:brion
Status:old
Tags:
Comment:
de-hardcode the returnto address so the templates can send back to the correct lang page
Modified paths:
  • /branches/ContactPageFundraiser/SpecialContact.php (modified) (history)

Diff [purge]

Index: branches/ContactPageFundraiser/SpecialContact.php
@@ -358,8 +358,11 @@
359359
360360 wfDebug( "$fname: success\n" );
361361
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() );
364367 wfRunHooks( 'ContactFromComplete', array( $to, $replyto, $subject, $this->text ) );
365368 }
366369 }

Status & tagging log