Followup r95002: unbreak getTokenUrl() by using a simpler hack that doesn't involve...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 31 Aug 2011 18:08:13 +0000 (18:08 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 31 Aug 2011 18:08:13 +0000 (18:08 +0000)
includes/User.php

index a9c3a2f..bf13349 100644 (file)
@@ -3302,7 +3302,7 @@ class User {
 
        /**
         * Internal function to format the e-mail validation/invalidation URLs.
-        * This uses $wgArticlePath directly as a quickie hack to use the
+        * This uses a quickie hack to use the
         * hardcoded English names of the Special: pages, for ASCII safety.
         *
         * @note Since these URLs get dropped directly into emails, using the
@@ -3315,14 +3315,9 @@ class User {
         * @return String Formatted URL
         */
        protected function getTokenUrl( $page, $token ) {
-               global $wgCanonicalServer, $wgArticlePath;
-               
-               return $wgCanonicalServer .
-                       str_replace(
-                               '$1',
-                               "Special:$page/$token",
-                               $wgArticlePath
-                       );
+               // Hack to bypass localization of 'Special:'
+               $title = Title::makeTitle( NS_MAIN, "Special:$page/$token" );
+               return $title->getCanonicalUrl();
        }
 
        /**