Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -232,12 +232,6 @@ |
233 | 233 | # How far the logs for overseeing quality revisions and depreciations go |
234 | 234 | $wgFlaggedRevsOversightAge = 30 * 24 * 3600; |
235 | 235 | |
236 | | -# Flagged revisions are always visible to users with rights below. |
237 | | -# Use '*' for non-user accounts. This is for read-restricted wikis. |
238 | | -$wgFlaggedRevsVisible = array(); |
239 | | -# If $wgFlaggedRevsVisible is populated, it is applied to talk pages too |
240 | | -$wgFlaggedRevsTalkVisible = true; |
241 | | - |
242 | 236 | # How long before Special:ValidationStatistics is updated. |
243 | 237 | # Set to false to disable (perhaps using a cron job instead). |
244 | 238 | $wgFlaggedRevsStatsAge = 2 * 3600; // 2 hours |
— | — | @@ -530,16 +524,12 @@ |
531 | 525 | # ######## |
532 | 526 | |
533 | 527 | function efSetFlaggedRevsConditionalHooks() { |
534 | | - global $wgHooks, $wgFlaggedRevsVisible; |
| 528 | + global $wgHooks; |
535 | 529 | # Mark items in user contribs |
536 | 530 | if ( !FlaggedRevs::useOnlyIfProtected() ) { |
537 | 531 | $wgHooks['ContribsPager::getQueryInfo'][] = 'FlaggedRevsHooks::addToContribsQuery'; |
538 | 532 | $wgHooks['ContributionsLineEnding'][] = 'FlaggedRevsHooks::addToContribsLine'; |
539 | 533 | } |
540 | | - # Visibility - experimental |
541 | | - if ( !empty( $wgFlaggedRevsVisible ) ) { |
542 | | - $wgHooks['getUserPermissionsErrors'][] = 'FlaggedRevsHooks::userCanView'; |
543 | | - } |
544 | 534 | if ( FlaggedRevs::useProtectionLevels() ) { |
545 | 535 | # Add protection form field |
546 | 536 | $wgHooks['ProtectionForm::buildForm'][] = 'FlaggedRevsHooks::onProtectionForm'; |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -633,43 +633,6 @@ |
634 | 634 | return true; |
635 | 635 | } |
636 | 636 | |
637 | | - /** |
638 | | - * Allow users to view reviewed pages |
639 | | - */ |
640 | | - public static function userCanView( Title $title, $user, $action, &$result ) { |
641 | | - global $wgFlaggedRevsVisible, $wgFlaggedRevsTalkVisible, $wgTitle; |
642 | | - # Assume $action may still not be set, in which case, treat it as 'view'... |
643 | | - # Return out if $result set to false by some other hooked call. |
644 | | - if ( $action !== 'read' || $result === false || empty( $wgFlaggedRevsVisible ) ) |
645 | | - return true; |
646 | | - # Admin may set this to false, rather than array()... |
647 | | - $groups = $user->getGroups(); |
648 | | - $groups[] = '*'; |
649 | | - if ( !array_intersect( $groups, $wgFlaggedRevsVisible ) ) |
650 | | - return true; |
651 | | - # Is this a talk page? |
652 | | - if ( $wgFlaggedRevsTalkVisible && $title->isTalkPage() ) { |
653 | | - $result = true; |
654 | | - return true; |
655 | | - } |
656 | | - # See if there is a stable version. Also, see if, given the page |
657 | | - # config and URL params, the page can be overriden. The later |
658 | | - # only applies on page views of $title. |
659 | | - $flaggedArticle = FlaggedArticle::getTitleInstance( $title ); |
660 | | - if ( !empty( $wgTitle ) && $wgTitle->equals( $title ) ) { |
661 | | - $view = FlaggedArticleView::singleton(); |
662 | | - // Cache stable version while we are at it. |
663 | | - if ( $view->pageOverride() && $flaggedArticle->getStableRev() ) { |
664 | | - $result = true; |
665 | | - } |
666 | | - } else { |
667 | | - if ( FlaggedRevision::newFromStable( $title ) ) { |
668 | | - $result = true; |
669 | | - } |
670 | | - } |
671 | | - return true; |
672 | | - } |
673 | | - |
674 | 637 | /** |
675 | 638 | * When an edit is made by a user, review it if either: |
676 | 639 | * (a) The user can 'autoreview' and the edit's base revision is a checked |