r48138 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48137‎ | r48138 | r48139 >
Date:18:33, 7 March 2009
Author:demon
Status:ok
Tags:
Comment:
(bug 17844) Redirect users to a specific page when they log in. Based on patch by Simon Walker
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserlogin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -86,6 +86,7 @@
8787 * RememberTheDot
8888 * René Kijewski
8989 * ST47
 90+* Simon Walker
9091 * Stefano
9192 * Str4nd
9293
Index: trunk/phase3/includes/DefaultSettings.php
@@ -3759,3 +3759,9 @@
37603760 * Has no effect if no tags are defined in valid_tag.
37613761 */
37623762 $wgUseTagFilter = true;
 3763+
 3764+/**
 3765+ * Allow redirection to another page when a user logs in.
 3766+ * To enable, set to a string like 'Main Page'
 3767+ */
 3768+$wgRedirectOnLogin = null;
Index: trunk/phase3/includes/specials/SpecialUserlogin.php
@@ -45,7 +45,7 @@
4646 */
4747 function LoginForm( &$request, $par = '' ) {
4848 global $wgLang, $wgAllowRealName, $wgEnableEmail;
49 - global $wgAuth;
 49+ global $wgAuth, $wgRedirectOnLogin;
5050
5151 $this->mType = ( $par == 'signup' ) ? $par : $request->getText( 'type' ); # Check for [[Special:Userlogin/signup]]
5252 $this->mName = $request->getText( 'wpName' );
@@ -66,6 +66,10 @@
6767 $this->mLanguage = $request->getText( 'uselang' );
6868 $this->mSkipCookieCheck = $request->getCheck( 'wpSkipCookieCheck' );
6969
 70+ if ( $wgRedirectOnLogin ) {
 71+ $this->mReturnTo = $wgRedirectOnLogin;
 72+ }
 73+
7074 if( $wgEnableEmail ) {
7175 $this->mEmail = $request->getText( 'wpEmail' );
7276 } else {
Index: trunk/phase3/RELEASE-NOTES
@@ -27,6 +27,8 @@
2828 from rel="nofollow" on external links
2929 * (bug 12970) Added $wgForceClientThumbnails to force client rendering of thumbs,
3030 instead of falling back to GD.
 31+* Added $wgRedirectOnLogin to allow specifying a specifc page to redirect users
 32+ to upon logging in (ex: "Main Page")
3133
3234 === New features in 1.15 ===
3335
@@ -127,6 +129,8 @@
128130 of $wgSpamRegex for edit summary checks. Text checks still use $wgSpamRegex.
129131 * New function to convert content text to specified language (only applies on wiki with
130132 LanguageConverter class)
 133+* (bug 17844) Redirect users to a specific page when they log in, see
 134+ $wgRedirectOnLogin
131135
132136 === Bug fixes in 1.15 ===
133137 * (bug 16968) Special:Upload no longer throws useless warnings.

Status & tagging log