r74903 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74902‎ | r74903 | r74904 >
Date:17:24, 17 October 2010
Author:platonides
Status:deferred
Tags:
Comment:
Replace getPageRenderingHash with $wgContLang->getExtraHashOptions() + $wgRenderHashAppend
as discussed in bug 20040
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -298,16 +298,13 @@
299299 * load CategoryTreeFunctions.php on demand.
300300 */
301301 function ajax( $category, $depth = 1 ) {
302 - global $wgUser;
 302+ global $wgContLang, $wgRenderHashAppend;
303303 $title = self::makeTitle( $category );
304304
305305 if ( ! $title ) {
306306 return false; # TODO: error message?
307307 }
308308
309 - # configkey needed to take into account variant and secure options.
310 - $configkey = $wgUser->getPageRenderingHash();
311 -
312309 # Retrieve page_touched for the category
313310 $dbkey = $title->getDBkey();
314311 $dbr = wfGetDB( DB_SLAVE );
@@ -317,7 +314,7 @@
318315 'page_title' => $dbkey,
319316 ), __METHOD__ );
320317
321 - $mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $configkey );
 318+ $mckey = wfMemcKey( "categorytree(" . $this->getOptionsAsCacheKey( $depth ) . ")", $dbkey, $wgContLang->getExtraHashOptions(), $wgRenderHashAppend );
322319
323320 $response = new AjaxResponse();
324321

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r64672fix bug 20040: add PageRenderingHash to cache key to prevent cache mixup. Pat...daniel21:46, 6 April 2010

Status & tagging log