From f70f8b6c3b762f058153b87a0253b7324a28ae8b Mon Sep 17 00:00:00 2001 From: Liangent Date: Mon, 4 Jun 2012 11:51:29 +0800 Subject: [PATCH] Purge Squid variant pages based on page language (not $wgContLang) This reverts commit 10c37d58fe91ba73572343a09ab5b576f11a7d1f. Change-Id: I60985a2c3914308102cfc11544abc409ab8b860a --- includes/Title.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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 ); } -- 2.20.1