r47591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47590‎ | r47591 | r47592 >
Date:21:27, 20 February 2009
Author:jnatividad
Status:deferred
Tags:
Comment:
really fixed bug 17573 - eliminate possible hash collisions in cache. Now also includes article title to ensure identical ploticus queries on different pages do not have cache collissions
Modified paths:
  • /trunk/extensions/SemanticResultFormats/Ploticus/SRF_Ploticus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticResultFormats/Ploticus/SRF_Ploticus.php
@@ -104,7 +104,7 @@
105105 }
106106
107107 protected function getResultText($res, $outputmode) {
108 - global $smwgIQRunningNumber, $wgUploadDirectory, $wgUploadPath, $wgScriptPath, $srfgPloticusPath, $srfgEnvSettings;
 108+ global $smwgIQRunningNumber, $wgUploadDirectory, $wgUploadPath, $wgArticle, $wgScriptPath, $srfgPloticusPath, $srfgEnvSettings;
109109
110110 $this->isHTML = true;
111111 $this->outputmode = SMW_OUTPUT_HTML;
@@ -183,7 +183,7 @@
184184
185185 // we create a hash based on params
186186 // this is a great way to see if the params and/or the query result has changed
187 - $hashname = hash('md5', $smwgIQRunningNumber . implode(',',$this->m_params));
 187+ $hashname = hash('md5', $wgArticle->mTitle . $smwgIQRunningNumber . implode(',',$this->m_params));
188188 if ($this->m_imageformat != 'csv' && $this->m_liveupdating) {
189189 // only include contents of result csv in hash when liveupdating is on and imageformat != csv
190190 // in this way, doing file_exists check against hash filename will fail when query result has changed

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r47589fixed bug 17573 - eliminate possible hash collisions in cache; removed redund...jnatividad21:11, 20 February 2009

Status & tagging log