Index: branches/wmf-deployment/extensions/FlaggedRevs_alpha/FlaggedRevs.class.php |
— | — | @@ -565,7 +565,7 @@ |
566 | 566 | global $wgParser; |
567 | 567 | # Make our hooks trigger (force unstub so setting doesn't get lost) |
568 | 568 | $wgParser->firstCallInit(); |
569 | | - $wgParser->fr_isStable = true; |
| 569 | + $wgParser->fr_isStable = ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ); |
570 | 570 | # Parse with default options |
571 | 571 | $options = self::makeParserOptions(); |
572 | 572 | $outputText = $wgParser->preprocess( $text, $title, $options, $id ); |
— | — | @@ -590,7 +590,7 @@ |
591 | 591 | $title = $article->getTitle(); // avoid pass-by-reference error |
592 | 592 | # Make our hooks trigger (force unstub so setting doesn't get lost) |
593 | 593 | $wgParser->firstCallInit(); |
594 | | - $wgParser->fr_isStable = true; |
| 594 | + $wgParser->fr_isStable = ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ); |
595 | 595 | # Don't show section-edit links, they can be old and misleading |
596 | 596 | $options = self::makeParserOptions(); |
597 | 597 | # Parse the new body, wikitext -> html |
Index: branches/wmf-deployment/extensions/FlaggedRevs_alpha/FlaggedRevs.hooks.php |
— | — | @@ -462,9 +462,6 @@ |
463 | 463 | if ( !$parser || empty( $parser->fr_isStable ) || $title->getNamespace() < 0 ) { |
464 | 464 | return true; |
465 | 465 | } |
466 | | - if( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
467 | | - return true; // use the current version as normal |
468 | | - } |
469 | 466 | $dbr = wfGetDB( DB_SLAVE ); |
470 | 467 | # Check for stable version of template if this feature is enabled. |
471 | 468 | # Should be in reviewable namespace, this saves unneeded DB checks as |
— | — | @@ -526,9 +523,6 @@ |
527 | 524 | if ( empty( $parser->fr_isStable ) ) { |
528 | 525 | return true; |
529 | 526 | } |
530 | | - if( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
531 | | - return true; // use the current version as normal |
532 | | - } |
533 | 527 | $file = null; |
534 | 528 | $isKnownLocal = $isLocalFile = false; // local file on this wiki? |
535 | 529 | # Normalize NS_MEDIA to NS_FILE |
— | — | @@ -627,9 +621,6 @@ |
628 | 622 | if ( empty( $ig->mParser->fr_isStable ) || $nt->getNamespace() != NS_FILE ) { |
629 | 623 | return true; |
630 | 624 | } |
631 | | - if( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
632 | | - return true; // use the current version as normal |
633 | | - } |
634 | 625 | $file = null; |
635 | 626 | $isKnownLocal = $isLocalFile = false; // local file on this wiki? |
636 | 627 | # Check for stable version of image if this feature is enabled. |