Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -427,14 +427,14 @@ |
428 | 428 | */ |
429 | 429 | public static function parseStableText( $article, $text='', $id, $reparsed = true ) { |
430 | 430 | global $wgParser; |
| 431 | + $title = $article->getTitle(); // avoid pass-by-reference error |
431 | 432 | # Make our hooks to trigger |
432 | 433 | $wgParser->fr_isStable = true; |
433 | 434 | $wgParser->fr_includesMatched = true; |
434 | 435 | # Don't show section-edit links, they can be old and misleading |
435 | 436 | $options = self::makeParserOptions(); |
436 | | - $options->setEditSection( $id==$article->getLatest() ); |
| 437 | + $options->setEditSection( $id == $title->getLatestRevID(GAID_FOR_UPDATE) ); |
437 | 438 | # Parse the new body, wikitext -> html |
438 | | - $title = $article->getTitle(); // avoid pass-by-reference error |
439 | 439 | $parserOut = $wgParser->parse( $text, $title, $options, true, true, $id ); |
440 | 440 | $parserOut->fr_includesMatched = $wgParser->fr_includesMatched; |
441 | 441 | # Done with parser! |
— | — | @@ -490,7 +490,7 @@ |
491 | 491 | */ |
492 | 492 | public static function flaggedRevIsSynced( $frev, $article, $flaggedOutput=null, $currentOutput=null ) { |
493 | 493 | # Must be the same revision |
494 | | - if( $frev->getRevId() != $article->getLatest() ) { |
| 494 | + if( $frev->getRevId() != $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE) ) { |
495 | 495 | return false; |
496 | 496 | } |
497 | 497 | global $wgMemc; |
— | — | @@ -753,7 +753,7 @@ |
754 | 754 | # Check if the count is zero by using $article->getLatest(). |
755 | 755 | # I don't trust using memcache and PHP for values like '0' |
756 | 756 | # as it may confuse "expired" with "0". -aaron |
757 | | - if( $article->getLatest()==$from_rev ) { |
| 757 | + if( $article->getTitle()->getLatestRevID(GAID_FOR_UPDATE) == $from_rev ) { |
758 | 758 | return 0; |
759 | 759 | } |
760 | 760 | global $wgMemc; |