mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-15 03:43:55 +00:00
* (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:
parent
0b7f161778
commit
c1f82b9325
Notes:
Brion Vibber
2011-09-09 21:08:50 +00:00
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue