EditPage: Use localized special page links for 'anoneditwarning'
authorFomafix <fomafix@googlemail.com>
Thu, 19 May 2016 20:36:02 +0000 (20:36 +0000)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 20 May 2016 18:43:01 +0000 (18:43 +0000)
This avoids a redirect from the generic special page to the localized special page.

Change-Id: Ica7995839b67a809dd9dcc12298209bee300e54b

includes/EditPage.php

index 0f52983..8acd036 100644 (file)
@@ -2833,9 +2833,14 @@ class EditPage {
                                        "<div id='mw-anon-edit-warning' class='warningbox'>\n$1\n</div>",
                                        [ 'anoneditwarning',
                                                // Log-in link
-                                               '{{fullurl:Special:UserLogin|returnto={{FULLPAGENAMEE}}}}',
+                                               SpecialPage::getTitleFor( 'Userlogin' )->getFullURL( [
+                                                       'returnto' => $this->getTitle()->getPrefixedDBkey()
+                                               ] ),
                                                // Sign-up link
-                                               '{{fullurl:Special:CreateAccount|returnto={{FULLPAGENAMEE}}}}' ]
+                                               SpecialPage::getTitleFor( 'CreateAccount' )->getFullURL( [
+                                                       'returnto' => $this->getTitle()->getPrefixedDBkey()
+                                               ] )
+                                       ]
                                );
                        } else {
                                $wgOut->wrapWikiMsg( "<div id=\"mw-anon-preview-warning\" class=\"warningbox\">\n$1</div>",