r74594 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74593‎ | r74594 | r74595 >
Date:14:11, 10 October 2010
Author:platonides
Status:ok
Tags:
Comment:
Use wfMemcKey instead of manually building the memcache key.
Not only is this more elegant, the former had collisions on wikis with different prefixes.
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -298,7 +298,7 @@
299299 * load CategoryTreeFunctions.php on demand.
300300 */
301301 function ajax( $category, $depth = 1 ) {
302 - global $wgDBname, $wgUser;
 302+ global $wgUser;
303303 $title = self::makeTitle( $category );
304304
305305 if ( ! $title ) {
@@ -317,7 +317,7 @@
318318 'page_title' => $dbkey,
319319 ), __METHOD__ );
320320
321 - $mckey = "$wgDBname:categorytree(" . $this->getOptionsAsCacheKey( $depth ) . "):$dbkey:$configkey";
 321+ $mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $configkey );
322322
323323 $response = new AjaxResponse();
324324

Status & tagging log