Index: trunk/extensions/FlaggedRevs/maintenance/cachePendingRevs.php |
— | — | @@ -30,7 +30,8 @@ |
31 | 31 | 'rev_page = fp_page_id', |
32 | 32 | 'rev_timestamp >= fp_pending_since' |
33 | 33 | ), |
34 | | - __METHOD__ |
| 34 | + __METHOD__, |
| 35 | + array( 'ORDER BY' => 'fp_pending_since DESC' ) |
35 | 36 | ); |
36 | 37 | foreach ( $ret as $row ) { |
37 | 38 | $title = Title::newFromRow( $row ); |
Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevs.hooks.php |
— | — | @@ -91,8 +91,8 @@ |
92 | 92 | * (b) Pages with stable versions that use this page will be purged |
93 | 93 | * Note: pages with current versions that use this page should already be purged |
94 | 94 | */ |
95 | | - public static function onArticleEditUpdates( Article $article ) { |
96 | | - FlaggedRevs::stableVersionUpdates( $article->getTitle() ); |
| 95 | + public static function onArticleEditUpdates( Article $article, $editInfo ) { |
| 96 | + FlaggedRevs::stableVersionUpdates( $article->getTitle(), null, null, $editInfo ); |
97 | 97 | FlaggedRevs::extraHTMLCacheUpdate( $article->getTitle() ); |
98 | 98 | return true; |
99 | 99 | } |
Index: trunk/extensions/FlaggedRevs/dataclasses/FlaggedRevs.class.php |
— | — | @@ -582,9 +582,12 @@ |
583 | 583 | * @param Title $title |
584 | 584 | * @param FlaggedRevision|null $sv, the new stable version (optional) |
585 | 585 | * @param FlaggedRevision|null $oldSv, the old stable version (optional) |
| 586 | + * @param Object editInfo Article edit info about the current revision (optional) |
586 | 587 | * @return bool stable version text/file changed and FR_INCLUDES_STABLE |
587 | 588 | */ |
588 | | - public static function stableVersionUpdates( Title $title, $sv = null, $oldSv = null ) { |
| 589 | + public static function stableVersionUpdates( |
| 590 | + Title $title, $sv = null, $oldSv = null, $editInfo = null |
| 591 | + ) { |
589 | 592 | $changed = false; |
590 | 593 | if ( $oldSv === null ) { // optional |
591 | 594 | $oldSv = FlaggedRevision::newFromStable( $title, FR_MASTER ); |
— | — | @@ -602,7 +605,7 @@ |
603 | 606 | } |
604 | 607 | } else { |
605 | 608 | # Update flagged page related fields |
606 | | - $article->updateStableVersion( $sv ); |
| 609 | + $article->updateStableVersion( $sv, $editInfo ? $editInfo->revid : null ); |
607 | 610 | # Check if pages using this need to be invalidated/purged... |
608 | 611 | if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_STABLE ) { |
609 | 612 | $changed = ( |
— | — | @@ -612,6 +615,10 @@ |
613 | 616 | $sv->getFileSha1() != $oldSv->getFileSha1() |
614 | 617 | ); |
615 | 618 | } |
| 619 | + # Update template/file version cache... |
| 620 | + if ( $sv->getRevId() != $editInfo->revid ) { |
| 621 | + RevisionReviewForm::setRevIncludes( $title, $editInfo->revid, $editInfo->output ); |
| 622 | + } |
616 | 623 | } |
617 | 624 | # Lazily rebuild dependancies on next parse (we invalidate below) |
618 | 625 | FlaggedRevs::clearStableOnlyDeps( $title ); |