Last modified: 2008-09-13 06:27:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T14284, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 12284 - Lack of "returnto" parameter on Special:Preferences (fix attached)
Lack of "returnto" parameter on Special:Preferences (fix attached)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
User preferences (Other open bugs)
1.12.x
All All
: Normal minor (vote)
: ---
Assigned To: Nobody - You can work on this!
: patch, patch-need-review
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-12-12 16:22 UTC by Marooned
Modified: 2008-09-13 06:27 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
bug 12284 pach (1.31 KB, patch)
2007-12-12 16:27 UTC, Marooned
Details

Description Marooned 2007-12-12 16:22:29 UTC
There is no "returnto" parameter on Special:Preferences in link to login page, so after login we are redirected to Main Page.

The diff fixing it for 1.12 (English only! it should be done in every translation) is here:

{{{
Index: SpecialPreferences.php

===================================================================

--- SpecialPreferences.php

+++ SpecialPreferences.php

@@ -121,10 +121,10 @@

 	}
 
 	function execute() {
-		global $wgUser, $wgOut, $wgWikiPrefs, $wgUseWikiPrefs;
+		global $wgUser, $wgOut, $wgWikiPrefs, $wgUseWikiPrefs, $wgTitle;
 
 		if ( $wgUser->isAnon() ) {
-			$wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext' );
+			$wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext', array($wgTitle->getPrefixedDBkey()) );
 			return;
 		}
 		if ( wfReadOnly() ) {
}}}
and:
{{{
Index: MessagesEn.php

===================================================================

--- MessagesEn.php

+++ MessagesEn.php

@@ -1233,7 +1233,7 @@

 'mypreferences'            => 'My preferences',
 'prefs-edits' => 'Number of edits:',
 'prefsnologin'             => 'Not logged in',
-'prefsnologintext'         => 'You must be [[Special:Userlogin|logged in]] to set user preferences.',
+'prefsnologintext'         => 'You must be <span class="plainlinks">[{{fullurl:Special:Userlogin|returnto=$1}} logged in]</span> to set user preferences.',
 'prefsreset'               => 'Preferences have been reset from storage.',
 'qbsettings'               => 'Quickbar',
 'qbsettings-none'          => 'None',
}}}

With this link will be "http://server/index.php?title=Special:Userlogin&returnto=Special:Preferences" instead of "http://server/index.php?title=Special:Userlogin".

//Marooned [at] wikia.com
Comment 1 Marooned 2007-12-12 16:27:08 UTC
Created attachment 4435 [details]
bug 12284 pach
Comment 2 X! 2008-09-13 06:27:44 UTC
Fixed in r40773

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links