Language: Introduce new method equals( Language $lang )
[lhc/web/wiklou.git] / includes / cache / HTMLFileCache.php
index cdf00c7..bb78aa0 100644 (file)
@@ -124,11 +124,10 @@ class HTMLFileCache extends FileCacheBase {
                $user = $context->getUser();
                // Check for non-standard user language; this covers uselang,
                // and extensions for auto-detecting user language.
-               $ulang = $context->getLanguage()->getCode();
-               $clang = $wgContLang->getCode();
+               $ulang = $context->getLanguage();
 
                // Check that there are no other sources of variation
-               if ( $user->getId() || $user->getNewtalk() || $ulang != $clang ) {
+               if ( $user->getId() || $user->getNewtalk() || $ulang->equals( $wgContLang ) ) {
                        return false;
                }
                // Allow extensions to disable caching