r33257 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33256‎ | r33257 | r33258 >
Date:19:20, 13 April 2008
Author:aaron
Status:old
Tags:
Comment:
Kill any text cache here
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevsPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php
@@ -371,7 +371,7 @@
372372 * @param Revision $rev
373373 */
374374 private function approveRevision( $rev ) {
375 - global $wgUser, $wgParser;
 375+ global $wgUser, $wgParser, $wgRevisionCacheExpiry, $wgMemc;;
376376 # Get the page this corresponds to
377377 $title = $rev->getTitle();
378378
@@ -517,6 +517,13 @@
518518 # Update flagged revisions table
519519 $dbw->replace( 'flaggedrevs', array( array('fr_page_id','fr_rev_id') ), $revset, __METHOD__ );
520520 $dbw->commit();
 521+
 522+ # Kill any text cache
 523+ if( $wgRevisionCacheExpiry ) {
 524+ $key = wfMemcKey( 'flaggedrevisiontext', 'revid', $rev->getId() );
 525+ $wgMemc->delete( $key );
 526+ }
 527+
521528 # Update recent changes
522529 $this->updateRecentChanges( $title, $dbw, $rev, $this->rcid );
523530

Status & tagging log