From: cenarium Date: Tue, 17 Feb 2015 19:55:00 +0000 (+0100) Subject: Adjusting patrol checks for RC and watchlist prefs X-Git-Tag: 1.31.0-rc.0~12374 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/%24spUrl?a=commitdiff_plain;h=2e73174639f4ed19fce204ef42092a46e0acea2c;p=lhc%2Fweb%2Fwiklou.git 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 --- 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',