From 6733edc3c9e2925a80fdab45681098daa922fe99 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Wed, 31 Aug 2011 18:08:13 +0000 Subject: [PATCH] Followup r95002: unbreak getTokenUrl() by using a simpler hack that doesn't involve $wgArticlePath --- includes/User.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/includes/User.php b/includes/User.php index a9c3a2f4ac..bf13349997 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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(); } /** -- 2.20.1