http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96693

Revision: 96693
Author:   brion
Date:     2011-09-09 21:08:50 +0000 (Fri, 09 Sep 2011)
Log Message:
-----------
* (bug 30834) Fix for incorrect cache handling of output language in 
CategoryTree ajax requests

Memcache key was not taking UI output language into account, and thus could 
serve you a cached record in another language from what should have been 
rendered for you.
Added UI language into the cache key, so they no longer interfere with each 
other.

Modified Paths:
--------------
    trunk/extensions/CategoryTree/CategoryTreeFunctions.php

Modified: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
===================================================================
--- trunk/extensions/CategoryTree/CategoryTreeFunctions.php     2011-09-09 
20:33:58 UTC (rev 96692)
+++ trunk/extensions/CategoryTree/CategoryTreeFunctions.php     2011-09-09 
21:08:50 UTC (rev 96693)
@@ -298,7 +298,7 @@
        * load CategoryTreeFunctions.php on demand.
        */
        function ajax( $category, $depth = 1 ) {
-               global $wgContLang, $wgRenderHashAppend;
+               global $wgLang, $wgContLang, $wgRenderHashAppend;
                $title = self::makeTitle( $category );
 
                if ( ! $title ) {
@@ -314,7 +314,7 @@
                                'page_title' => $dbkey,
                        ), __METHOD__ );
 
-               $mckey = wfMemcKey( "categorytree(" . 
$this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, 
$wgContLang->getExtraHashOptions(), $wgRenderHashAppend );
+               $mckey = wfMemcKey( "categorytree(" . 
$this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $wgLang->getCode(), 
$wgContLang->getExtraHashOptions(), $wgRenderHashAppend );
 
                $response = new AjaxResponse();
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to