r34584 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34583‎ | r34584 | r34585 >
Date:15:14, 10 May 2008
Author:aaron
Status:old
Tags:
Comment:
slave lag fixes (bug 14053)
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -427,14 +427,14 @@
428428 */
429429 public static function parseStableText( $article, $text='', $id, $reparsed = true ) {
430430 global $wgParser;
 431+ $title = $article->getTitle(); // avoid pass-by-reference error
431432 # Make our hooks to trigger
432433 $wgParser->fr_isStable = true;
433434 $wgParser->fr_includesMatched = true;
434435 # Don't show section-edit links, they can be old and misleading
435436 $options = self::makeParserOptions();
436 - $options->setEditSection( $id==$article->getLatest() );
 437+ $options->setEditSection( $id == $title->getLatestRevID(GAID_FOR_UPDATE) );
437438 # Parse the new body, wikitext -> html
438 - $title = $article->getTitle(); // avoid pass-by-reference error
439439 $parserOut = $wgParser->parse( $text, $title, $options, true, true, $id );
440440 $parserOut->fr_includesMatched = $wgParser->fr_includesMatched;
441441 # Done with parser!
@@ -490,7 +490,7 @@
491491 */
492492 public static function flaggedRevIsSynced( $frev, $article, $flaggedOutput=null, $currentOutput=null ) {
493493 # Must be the same revision
494 - if( $frev->getRevId() != $article->getLatest() ) {
 494+ if( $frev->getRevId() != $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE) ) {
495495 return false;
496496 }
497497 global $wgMemc;
@@ -753,7 +753,7 @@
754754 # Check if the count is zero by using $article->getLatest().
755755 # I don't trust using memcache and PHP for values like '0'
756756 # as it may confuse "expired" with "0". -aaron
757 - if( $article->getLatest()==$from_rev ) {
 757+ if( $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE) == $from_rev ) {
758758 return 0;
759759 }
760760 global $wgMemc;

Status & tagging log