From: Liangent Date: Sun, 3 Jun 2012 17:39:55 +0000 (+0800) Subject: Purge Squid variant pages based on page language (not $wgContLang) X-Git-Tag: 1.31.0-rc.0~23198^2~4^2~1 X-Git-Url: http://git.heureux-cyclage.org/?a=commitdiff_plain;h=0f9b9d51443a7c2fa62deba0953ce69b388b7c76;p=lhc%2Fweb%2Fwiklou.git Purge Squid variant pages based on page language (not $wgContLang) Change-Id: I36a55d0de33dd199513b94741b1833e8e0543b95 --- diff --git a/includes/Title.php b/includes/Title.php index 481f480c99..e6af0ba305 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3284,16 +3284,14 @@ class Title { * @return Array of String the URLs */ public function getSquidURLs() { - global $wgContLang; - $urls = array( $this->getInternalURL(), $this->getInternalURL( 'action=history' ) ); - // purge variant urls as well - if ( $wgContLang->hasVariants() ) { - $variants = $wgContLang->getVariants(); + $pageLang = $this->getPageLanguage(); + if ( $pageLang->hasVariants() ) { + $variants = $pageLang->getVariants(); foreach ( $variants as $vCode ) { $urls[] = $this->getInternalURL( '', $vCode ); }