Use wfMemcKey instead of manually building the memcache key.

Not only is this more elegant, the former had collisions on wikis with different prefixes.
This commit is contained in:
Platonides 2010-10-10 14:11:25 +00:00
parent 0d681c82ab
commit 19904b5851

View file

@ -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();