Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -82,6 +82,8 @@ |
83 | 83 | |
84 | 84 | # Do flagged revs override the default view? |
85 | 85 | $wgFlaggedRevsOverride = true; |
| 86 | +# Are pages only reviewable if the stable shows by default? |
| 87 | +$wgFlaggedRevsReviewForDefault = false; |
86 | 88 | # Do quality revisions show instead of sighted if present by default? |
87 | 89 | $wgFlaggedRevsPrecedence = true; |
88 | 90 | # Revision tagging can slow development... |
— | — | @@ -228,8 +230,6 @@ |
229 | 231 | # How far the logs for overseeing quality revisions and depreciations go |
230 | 232 | $wgFlaggedRevsOversightAge = 7 * 24 * 3600; |
231 | 233 | |
232 | | -# How many hours pending review is considering long? |
233 | | -$wgFlaggedRevsLongPending = array( 3, 12, 24 ); |
234 | 234 | # How many pages count as a backlog? |
235 | 235 | $wgFlaggedRevsBacklog = 2000; |
236 | 236 | |
Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -145,7 +145,12 @@ |
146 | 146 | * Is this article reviewable? |
147 | 147 | */ |
148 | 148 | public function isReviewable() { |
149 | | - return FlaggedRevs::isPageReviewable( $this->parent->getTitle() ); |
| 149 | + global $wgFlaggedRevsReviewForDefault; |
| 150 | + if( !FlaggedRevs::isPageReviewable( $this->parent->getTitle() ) ) |
| 151 | + return false; |
| 152 | + if( $wgFlaggedRevsReviewForDefault && !$this->showStableByDefault() ) |
| 153 | + return false; |
| 154 | + return true; |
150 | 155 | } |
151 | 156 | |
152 | 157 | /** |
— | — | @@ -730,24 +735,27 @@ |
731 | 736 | */ |
732 | 737 | public function addVisibilityLink( &$data ) { |
733 | 738 | global $wgUser, $wgRequest, $wgOut; |
734 | | - if( !$this->isReviewable() ) { |
| 739 | + # Check only if the title is reviewable |
| 740 | + if( !FlaggedRevs::isPageReviewable( $this->parent->getTitle() ) ) { |
735 | 741 | return true; |
736 | 742 | } |
737 | 743 | $action = $wgRequest->getVal( 'action', 'view' ); |
738 | 744 | if( $action == 'protect' || $action == 'unprotect' ) { |
739 | | - # Check for an overridabe revision |
740 | | - $frev = $this->getStableRev(); |
741 | | - if( !$frev ) { |
742 | | - return true; |
743 | | - } |
744 | 745 | wfLoadExtensionMessages( 'FlaggedRevs' ); |
745 | 746 | # Load special page name |
746 | 747 | wfLoadExtensionMessages( 'Stabilization' ); |
747 | 748 | $title = SpecialPage::getTitleFor( 'Stabilization' ); |
748 | 749 | # Give a link to the page to configure the stable version |
749 | | - $wgOut->prependHTML( "<span class='plainlinks'>" . |
750 | | - wfMsgExt( 'revreview-visibility',array('parseinline'), $title->getPrefixedText() ) . |
751 | | - "</span>" ); |
| 750 | + $frev = $this->getStableRev(); |
| 751 | + if( $frev && $frev->getRevId() == $this->parent->getLatest() ) { |
| 752 | + $wgOut->prependHTML( "<span class='plainlinks'>" . |
| 753 | + wfMsgExt( 'revreview-visibility',array('parseinline'), $title->getPrefixedText() ) . |
| 754 | + "</span>" ); |
| 755 | + } else { |
| 756 | + $wgOut->prependHTML( "<span class='plainlinks'>" . |
| 757 | + wfMsgExt( 'revreview-visibility2',array('parseinline'), $title->getPrefixedText() ) . |
| 758 | + "</span>" ); |
| 759 | + } |
752 | 760 | } |
753 | 761 | return true; |
754 | 762 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -781,8 +781,10 @@ |
782 | 782 | if( !$expiry || $expiry < $now ) { |
783 | 783 | $row = null; |
784 | 784 | self::purgeExpiredConfigurations(); |
| 785 | + $title->invalidateCache(); |
785 | 786 | } |
786 | | - } else { |
| 787 | + } |
| 788 | + if( !$row ) { |
787 | 789 | global $wgFlaggedRevsOverride, $wgFlaggedRevsPrecedence; |
788 | 790 | # Keep this consistent across settings. 1 -> override, 0 -> don't |
789 | 791 | $override = $wgFlaggedRevsOverride ? 1 : 0; |
Index: trunk/extensions/FlaggedRevs/language/FlaggedRevs.i18n.php |
— | — | @@ -146,7 +146,8 @@ |
147 | 147 | 'revreview-update-none' => 'Please [[{{MediaWiki:Validationpage}}|review]] any changes \'\'(shown below)\'\' made since the stable revision was [{{fullurl:Special:Log|type=review&page={{FULLPAGENAMEE}}}} approved].', |
148 | 148 | 'revreview-update-use' => '\'\'\'NOTE:\'\'\' If any of these templates/images have a stable version, then it is already used in the stable version of this page.', |
149 | 149 | 'revreview-diffonly' => '\'\'To review the page, click the "current revision" revision link and use the review form.\'\'', |
150 | | - 'revreview-visibility' => '\'\'\'This page has a [[{{MediaWiki:Validationpage}}|stable version]]; settings for it can be [{{fullurl:Special:Stabilization|page={{FULLPAGENAMEE}}}} configured].\'\'\'', |
| 150 | + 'revreview-visibility' => '\'\'\'This page has an updated [[{{MediaWiki:Validationpage}}|stable version]]; page stability settings can be [{{fullurl:Special:Stabilization|page={{FULLPAGENAMEE}}}} configured].\'\'\'', |
| 151 | + 'revreview-visibility2' => '\'\'\'This page does not have an updated [[{{MediaWiki:Validationpage}}|stable version]]; page stability settings can be [{{fullurl:Special:Stabilization|page={{FULLPAGENAMEE}}}} configured].\'\'\'', |
151 | 152 | 'right-autopatrolother' => 'Automatically mark revisions in non-main namespaces patrolled', |
152 | 153 | 'right-autoreview' => 'Automatically mark revisions as sighted', |
153 | 154 | 'right-movestable' => 'Move stable pages', |
Index: trunk/extensions/FlaggedRevs/specialpages/OldReviewedPages_body.php |
— | — | @@ -118,17 +118,8 @@ |
119 | 119 | } |
120 | 120 | |
121 | 121 | protected static function getLineClass( $hours, $uw ) { |
122 | | - global $wgFlaggedRevsLongPending; |
123 | 122 | if( !$uw ) |
124 | 123 | return 'fr-unreviewed-unwatched'; |
125 | | - # Show variable colors |
126 | | - /*if( $hours > $wgFlaggedRevsLongPending[2] ) |
127 | | - return 'fr-pending-long3'; |
128 | | - if( $hours > $wgFlaggedRevsLongPending[1] ) |
129 | | - return 'fr-pending-long2'; |
130 | | - if( $hours > $wgFlaggedRevsLongPending[0] ) |
131 | | - return 'fr-pending-long'; |
132 | | - */ |
133 | 124 | # Default: none |
134 | 125 | return ""; |
135 | 126 | } |