From 2e73174639f4ed19fce204ef42092a46e0acea2c Mon Sep 17 00:00:00 2001 From: cenarium Date: Tue, 17 Feb 2015 20:55:00 +0100 Subject: [PATCH] Adjusting patrol checks for RC and watchlist prefs This uses the NP patrol check instead of the RC patrol check for the preference option that allows to hide unpatrolled new pages by default. And this checks use of RC patrol for the user instead of the config for the watchlist option (so that users who cannot patrol don't have it). Bug: T89716 Change-Id: I2895a96f8c21ade83b0174d0d02d1b7e00625737 --- includes/Preferences.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/Preferences.php b/includes/Preferences.php index 84d4189524..40c3a2b888 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -893,6 +893,9 @@ class Preferences { 'section' => 'rc/advancedrc', 'label-message' => 'tog-hidepatrolled', ); + } + + if ( $user->useNPPatrol() ) { $defaultPreferences['newpageshidepatrolled'] = array( 'type' => 'toggle', 'section' => 'rc/advancedrc', @@ -991,7 +994,7 @@ class Preferences { 'label-message' => 'tog-watchlisthideliu', ); - if ( $context->getConfig()->get( 'UseRCPatrol' ) ) { + if ( $user->useRCPatrol() ) { $defaultPreferences['watchlisthidepatrolled'] = array( 'type' => 'toggle', 'section' => 'watchlist/advancedwatchlist', -- 2.20.1