Replace getPageRenderingHash with $wgContLang->getExtraHashOptions() + $wgRenderHashAppend

as discussed in bug 20040
This commit is contained in:
Platonides 2010-10-17 17:24:09 +00:00
parent a9bebe01e5
commit 57d025e067

View file

@ -298,16 +298,13 @@ class CategoryTree {
* load CategoryTreeFunctions.php on demand.
*/
function ajax( $category, $depth = 1 ) {
global $wgUser;
global $wgContLang, $wgRenderHashAppend;
$title = self::makeTitle( $category );
if ( ! $title ) {
return false; # TODO: error message?
}
# configkey needed to take into account variant and secure options.
$configkey = $wgUser->getPageRenderingHash();
# Retrieve page_touched for the category
$dbkey = $title->getDBkey();
$dbr = wfGetDB( DB_SLAVE );
@ -317,7 +314,7 @@ class CategoryTree {
'page_title' => $dbkey,
), __METHOD__ );
$mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $configkey );
$mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $wgContLang->getExtraHashOptions(), $wgRenderHashAppend );
$response = new AjaxResponse();