r113607 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113606‎ | r113607 | r113608 >
Date:00:50, 12 March 2012
Author:akshay
Status:deferred (Comments)
Tags:
Comment:
added support for HTTPS using signupend
Modified paths:
  • /trunk/extensions/SignupAPI/includes/SpecialUserSignup.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SignupAPI/includes/SpecialUserSignup.php
@@ -732,6 +732,15 @@
733733 if( $this->mLanguage )
734734 $template->set( 'uselang', $this->mLanguage );
735735 }
 736+
 737+ // Use signupend-https for HTTPS requests if it's not blank, signupend otherwise
 738+ $usingHTTPS = WebRequest::detectProtocol() == 'https';
 739+ $signupendHTTPS = $this->msg( 'signupend-https' );
 740+ if ( $usingHTTPS && !$signupendHTTPS->isBlank() ) {
 741+ $template->set( 'signupend', $signupendHTTPS->parse() );
 742+ } else {
 743+ $template->set( 'signupend', $this->msg( 'signupend' )->parse() );
 744+ }
736745
737746 // Give authentication and captcha plugins a chance to modify the form
738747 $wgAuth->modifyUITemplate( $template, $this->mType );

Comments

#Comment by Reedy (talk | contribs)   00:53, 12 March 2012

I was going to question why/how you were doing this... Then I noticed core does the same...

#Comment by Akshay.agarwal (talk | contribs)   01:08, 12 March 2012

Yeah, I copied it from core.

Status & tagging log