From: Moriel Schottlender Date: Mon, 26 Mar 2018 08:04:40 +0000 (+0300) Subject: RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled X-Git-Tag: 1.31.0-rc.0~279^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22articles%22%2C%22id_article=%24ze_article%22%29%20.%20%22?a=commitdiff_plain;h=d13b22c4742922a4e3b7f29d73cfceb48bee4e08;p=lhc%2Fweb%2Fwiklou.git RCFilters: Hide 'reload watchlist automatically' setting if RCFilters is enabled Bug: T186277 Change-Id: I78a2bae5f8d0e6f947276c69fa1806eeaad46197 --- diff --git a/includes/preferences/DefaultPreferencesFactory.php b/includes/preferences/DefaultPreferencesFactory.php index 478f373ab4..b2b68d21f9 100644 --- a/includes/preferences/DefaultPreferencesFactory.php +++ b/includes/preferences/DefaultPreferencesFactory.php @@ -1117,11 +1117,18 @@ class DefaultPreferencesFactory implements PreferencesFactory { 'section' => 'watchlist/advancedwatchlist', 'label-message' => 'tog-watchlisthideliu', ]; - $defaultPreferences['watchlistreloadautomatically'] = [ - 'type' => 'toggle', - 'section' => 'watchlist/advancedwatchlist', - 'label-message' => 'tog-watchlistreloadautomatically', - ]; + + if ( !\SpecialWatchlist::checkStructuredFilterUiEnabled( + $this->config, + $user + ) ) { + $defaultPreferences['watchlistreloadautomatically'] = [ + 'type' => 'toggle', + 'section' => 'watchlist/advancedwatchlist', + 'label-message' => 'tog-watchlistreloadautomatically', + ]; + } + $defaultPreferences['watchlistunwatchlinks'] = [ 'type' => 'toggle', 'section' => 'watchlist/advancedwatchlist',