(bug 12284) Special:Preferences now sets a returnto parameter on the link to Special...
authorX! <soxred93@users.mediawiki.org>
Sat, 13 Sep 2008 06:27:17 +0000 (06:27 +0000)
committerX! <soxred93@users.mediawiki.org>
Sat, 13 Sep 2008 06:27:17 +0000 (06:27 +0000)
Patch by Marooned.

CREDITS
RELEASE-NOTES
includes/specials/SpecialPreferences.php
languages/messages/MessagesEn.php

diff --git a/CREDITS b/CREDITS
index c38145e..e37ea1b 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -45,6 +45,7 @@ following names for their contribution to the product.
 * Jeremy Baron
 * Juliano F. Ravasi
 * Louperivois
+* Marooned
 * Matt Johnston
 * Max Semenik
 * Michael De La Rue
index 5d202fa..c68068a 100644 (file)
@@ -196,6 +196,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 15497) Removed encoding attribute from <?xml ?> tag
 * (bug 15544) Wiki not set up message (NoLocalSettings.php) now works for 
   non-index.php entry pages (e.g. api.php). Patch by Matt Johnston.
+* (bug 12284) Special:Preferences now sets a returnto parameter on the link to Special:Userlogin. Patch by Marooned.
 
 
 === API changes in 1.14 ===
index b572749..bc33f09 100644 (file)
@@ -104,10 +104,10 @@ class PreferencesForm {
        }
 
        function execute() {
-               global $wgUser, $wgOut;
+               global $wgUser, $wgOut, $wgTitle;
 
                if ( $wgUser->isAnon() ) {
-                       $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext' );
+                       $wgOut->showErrorPage( 'prefsnologin', 'prefsnologintext', array($wgTitle->getPrefixedDBkey()) );
                        return;
                }
                if ( wfReadOnly() ) {
index 859e6c6..edc5a9b 100644 (file)
@@ -1467,7 +1467,7 @@ Note that their indexes of {{SITENAME}} content may be out of date.',
 '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',