From 3d90e2a880e65a76610130b7118ddfe765f6cecb Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 9 Apr 2010 12:41:25 +0000 Subject: [PATCH] Don't use $wgVariantArticlePath when the main language code is specified as a parameter to Title::getLocalURL(). Breakage observed on sr.wikipedia.org. --- includes/Title.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/Title.php b/includes/Title.php index 09d68b23d8..700f7e60cc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -826,6 +826,9 @@ class Title { $pref = $wgContLang->getPreferredVariant(false); if($pref != $wgContLang->getCode()) $variant = $pref; + } elseif ( $variant == $wgContLang->getCode() ) { + // Don't use $wgVariantArticlePath for the main code + $variant = false; } if ( $this->isExternal() ) { -- 2.20.1