r85642 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85641‎ | r85642 | r85643 >
Date:21:36, 7 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
address bug 27765
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php
@@ -225,14 +225,19 @@
226226 $this->doDataUpdate( $data );
227227
228228 // Invalidate the page, so data stored on it gets displayed immeditaely in queries.
229 - global $smwgAutoRefreshSubject;
 229+ global $smwgAutoRefreshSubject, $wgDBtype;
230230 if ( $smwgAutoRefreshSubject && !wfReadOnly() ) {
231231 $title = $data->getSubject()->getTitle();
232232 $dbw = wfGetDB( DB_MASTER );
 233+ $ts = $dbw->timestamp();
233234
 235+ if ( $wgDBtype == 'mysql' ) {
 236+ $ts += 9001; // This is a hack to invalidate the page cache after the save completes, so it re-renders.
 237+ }
 238+
234239 $dbw->update(
235240 'page',
236 - array( 'page_touched' => $dbw->timestamp() + 9001 ),
 241+ array( 'page_touched' => $ts ),
237242 $title->pageCond(),
238243 __METHOD__
239244 );

Follow-up revisions

RevisionCommit summaryAuthorDate
r85736implemented better fix suggested at bug 27765jeroendedauw20:11, 9 April 2011

Status & tagging log