From: Roan Kattouw Date: Wed, 31 Aug 2011 18:08:13 +0000 (+0000) Subject: Followup r95002: unbreak getTokenUrl() by using a simpler hack that doesn't involve... X-Git-Tag: 1.31.0-rc.0~27993 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22upgrade%22%2C%22reinstall=non%22%29%20.%20%22?a=commitdiff_plain;h=6733edc3c9e2925a80fdab45681098daa922fe99;p=lhc%2Fweb%2Fwiklou.git Followup r95002: unbreak getTokenUrl() by using a simpler hack that doesn't involve $wgArticlePath --- 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(); } /**