* (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.
This commit is contained in:
Brion Vibber 2011-09-09 21:08:50 +00:00
parent 0b7f161778
commit c1f82b9325
Notes: Brion Vibber 2011-09-09 21:08:50 +00:00

View file

@ -298,7 +298,7 @@ class CategoryTree {
* 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 @@ class CategoryTree {
'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();