From 13c4cd311f96ceca73a1405a11c123b10f9405e1 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sun, 12 Oct 2008 19:00:27 +0000 Subject: [PATCH] Check $wgUser->useRCPatrol() --- includes/specials/SpecialWatchlist.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 6d7d6af956..7cf4879b0e 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -163,7 +163,7 @@ function wfSpecialWatchlist( $par ) { $andHideMinor = $hideMinor ? "AND (rc_minor = 0)" : ''; $andHideLiu = $hideLiu ? "AND (rc_user = 0)" : ''; $andHideAnons = $hideAnons ? "AND (rc_user != 0)" : ''; - $andHidePatrolled = $hidePatrolled ? "AND (rc_patrolled != 1)" : ''; + $andHidePatrolled = $wgUser->useRCPatrol() && $hidePatrolled ? "AND (rc_patrolled != 1)" : ''; # Toggle watchlist content (all recent edits or just the latest) if( $wgUser->getOption( 'extendwatchlist' )) { @@ -276,10 +276,12 @@ function wfSpecialWatchlist( $par ) { $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ); # Hide/show patrolled edits - $label = $hidePatrolled ? wfMsgHtml( 'watchlist-show-patrolled' ) : wfMsgHtml( 'watchlist-hide-patrolled' ); - $linkBits = wfArrayToCGI( array( 'hidePatrolled' => 1 - (int)$hidePatrolled ), $nondefaults ); - $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ); - + if( $wgUser->useRCPatrol() ) { + $label = $hidePatrolled ? wfMsgHtml( 'watchlist-show-patrolled' ) : wfMsgHtml( 'watchlist-hide-patrolled' ); + $linkBits = wfArrayToCGI( array( 'hidePatrolled' => 1 - (int)$hidePatrolled ), $nondefaults ); + $links[] = $skin->makeKnownLinkObj( $thisTitle, $label, $linkBits ); + } + # Namespace filter and put the whole form together. $form .= $wlInfo; $form .= $cutofflinks; -- 2.20.1