Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1183,6 +1183,10 @@ |
1184 | 1184 | global $wgUseStableTemplates; |
1185 | 1185 | $sv = FlaggedRevision::newFromStable( $linksUpdate->mTitle, !$wgUseStableTemplates, true ); |
1186 | 1186 | if( !$sv ) { |
| 1187 | + $dbw = wfGetDB( DB_MASTER ); |
| 1188 | + $dbw->delete( 'flaggedpages', |
| 1189 | + array( 'fp_page_id' => $linksUpdate->mTitle->getArticleId() ), |
| 1190 | + __METHOD__ ); |
1187 | 1191 | wfProfileOut( __METHOD__ ); |
1188 | 1192 | return true; |
1189 | 1193 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -504,19 +504,24 @@ |
505 | 505 | $flaggedOutput = FlaggedRevs::parseStableText( $article, $oldfrev->getTextForParse(), $oldfrev->getRevId() ); |
506 | 506 | } |
507 | 507 | |
| 508 | + # Be looser on includes for templates, since they don't matter much |
| 509 | + # and strict checking breaks randomized images/metatemplates...(bug 14580) |
| 510 | + global $wgUseCurrentTemplates, $wgUseCurrentImages; |
| 511 | + $noMatch = ($rev->getTitle()->getNamespace() == NS_TEMPLATE && $wgUseCurrentTemplates && $wgUseCurrentImages); |
| 512 | + |
508 | 513 | # Set our versioning params cache |
509 | 514 | FlaggedRevs::setIncludeVersionCache( $rev->getId(), $tmpParams, $imgParams ); |
510 | 515 | # Get the expanded text and resolve all templates. |
511 | 516 | # Store $templateIDs and add it to final parser output later... |
512 | 517 | list($fulltext,$tmps,$tmpIDs,$err,$maxID) = FlaggedRevs::expandText( $rev->getText(), $rev->getTitle(), $rev->getId() ); |
513 | | - if( !empty($err) || $maxID > $lastTempID ) { |
| 518 | + if( !$noMatch && (!empty($err) || $maxID > $lastTempID) ) { |
514 | 519 | wfProfileOut( __METHOD__ ); |
515 | 520 | return $err; |
516 | 521 | } |
517 | 522 | # Parse the rest and check if it matches up |
518 | 523 | $stableOutput = FlaggedRevs::parseStableText( $article, $fulltext, $rev->getId(), false ); |
519 | 524 | $err =& $stableOutput->fr_includeErrors; |
520 | | - if( !empty($err) || $stableOutput->fr_newestImageTime > $lastImgTime ) { |
| 525 | + if( !$noMatch && (!empty($err) || $stableOutput->fr_newestImageTime > $lastImgTime) ) { |
521 | 526 | wfProfileOut( __METHOD__ ); |
522 | 527 | return $err; |
523 | 528 | } |