Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -395,9 +395,6 @@ |
396 | 396 | # Backlog notice |
397 | 397 | $wgHooks['SiteNoticeAfter'][] = 'FlaggedRevsHooks::addBacklogNotice'; |
398 | 398 | |
399 | | -# Visibility - experimental |
400 | | -$wgHooks['userCan'][] = 'FlaggedRevsHooks::userCanView'; |
401 | | - |
402 | 399 | # Override current revision, add patrol links, set cache... |
403 | 400 | $wgHooks['ArticleViewHeader'][] = 'FlaggedRevsHooks::onArticleViewHeader'; |
404 | 401 | $wgHooks['ImagePageFindFile'][] = 'FlaggedRevsHooks::imagePageFindFile'; |
— | — | @@ -450,7 +447,7 @@ |
451 | 448 | ######### |
452 | 449 | |
453 | 450 | function efLoadFlaggedRevs() { |
454 | | - global $wgUseRCPatrol, $wgFlaggedRevsNamespaces; |
| 451 | + global $wgUseRCPatrol, $wgFlaggedRevsNamespaces, $wgFlaggedRevsVisible; |
455 | 452 | # If patrolling is already on, then we know that it |
456 | 453 | # was intended to have all namespaces patrollable. |
457 | 454 | if( $wgUseRCPatrol ) { |
— | — | @@ -462,6 +459,11 @@ |
463 | 460 | if( !empty($wgFlaggedRevsNamespaces) ) { |
464 | 461 | $wgUseRCPatrol = true; |
465 | 462 | } |
| 463 | + # Visibility - experimental |
| 464 | + if( !empty($wgFlaggedRevsVisible) ) { |
| 465 | + global $wgHooks; |
| 466 | + $wgHooks['userCan'][] = 'FlaggedRevsHooks::userCanView'; |
| 467 | + } |
466 | 468 | } |
467 | 469 | |
468 | 470 | /* |