From 19904b58515fd6ee968c85e5f89101c2ed54eff4 Mon Sep 17 00:00:00 2001 From: Platonides Date: Sun, 10 Oct 2010 14:11:25 +0000 Subject: [PATCH] Use wfMemcKey instead of manually building the memcache key. Not only is this more elegant, the former had collisions on wikis with different prefixes. --- CategoryTreeFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CategoryTreeFunctions.php b/CategoryTreeFunctions.php index 2b0e1e55..039d4abe 100644 --- a/CategoryTreeFunctions.php +++ b/CategoryTreeFunctions.php @@ -298,7 +298,7 @@ class CategoryTree { * load CategoryTreeFunctions.php on demand. */ function ajax( $category, $depth = 1 ) { - global $wgDBname, $wgUser; + global $wgUser; $title = self::makeTitle( $category ); if ( ! $title ) { @@ -317,7 +317,7 @@ class CategoryTree { 'page_title' => $dbkey, ), __METHOD__ ); - $mckey = "$wgDBname:categorytree(" . $this->getOptionsAsCacheKey( $depth ) . "):$dbkey:$configkey"; + $mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $configkey ); $response = new AjaxResponse();