Page MenuHomePhabricator

Lack of "returnto" parameter on Special:Preferences (fix attached)
Closed, ResolvedPublic

Description

Author: marooned

Description:
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


Version: 1.12.x
Severity: minor

Details

Reference
bz12284

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:00 PM
bzimport set Reference to bz12284.
bzimport added a subscriber: Unknown Object (MLST).

marooned wrote:

bug 12284 pach

Attached: