r99610 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99609‎ | r99610 | r99611 >
Date:00:32, 12 October 2011
Author:erik
Status:resolved (Comments)
Tags:
Comment:
Restore login logic; add default &campaign identifier (requires
CustomUserSignup extension to work, but should be harmless
otherwise) -- this allows us to customize the
"You need to have an account" message specifically for the
purpose of a contest or coding challenge.
Modified paths:
  • /trunk/extensions/Contest/specials/SpecialContestWelcome.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/specials/SpecialContestWelcome.php
@@ -179,17 +179,18 @@
180180 $contestName .= '/' . $challengeId;
181181 }
182182
183 - $signupTitle = SpecialPage::getTitleFor( 'ContestSignup', $contestName );
 183+ $signupitle = SpecialPage::getTitleFor( 'ContestSignup', $contestName );
184184
185 -// if ( $this->getUser()->isLoggedIn() ) {
186 - return $signupTitle->getLocalURL();
187 -// }
188 -// else {
189 -// return SpecialPage::getTitleFor( 'Userlogin' )->getLocalURL( array(
190 -// //'type' => 'signup',
191 -// 'returnto' => $signupTitle->getFullText()
192 -// ) );
193 -// }
 185+ if ( $this->getUser()->isLoggedIn() ) {
 186+ return $signupitle->getLocalURL();
 187+ }
 188+ else {
 189+ return SpecialPage::getTitleFor( 'Userlogin' )->getLocalURL( array(
 190+ //'type' => 'signup',
 191+ 'returnto' => $signupTitle->getFullText(),
 192+ 'campaign' => 'contests'
 193+ ) );
 194+ }
194195 }
195196
196197 }

Comments

#Comment by Nikerabbit (talk | contribs)   10:41, 12 October 2011

Interesting, are you going to use the CustomUserSignup extension in WMF?

#Comment by P858snake (talk | contribs)   10:45, 12 October 2011

Its already active on a few projects.

#Comment by Nikerabbit (talk | contribs)   11:18, 12 October 2011

Interesting! I think I am confusing that with the SemanticUserSignup extension.

Status & tagging log