X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=fcf1bfb8b91dbdb7843e7c0d4883a6497833dbf9;hb=f58546ef6e55342ff2d54bdf9e421102aed7aa76;hp=8a474864f086ba0953edf1f023a9839dae67ddfd;hpb=2351de46ffc56e5966f132ae2bc64c4b17450a38;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 8a474864f0..fcf1bfb8b9 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -248,6 +248,22 @@ class SpecialWatchlist extends ChangesListSpecialPage { $hideLiu = $registration->getFilter( 'hideliu' ); $hideLiu->setDefault( $user->getBoolOption( 'watchlisthideliu' ) ); + // Selecting both hideanons and hideliu on watchlist preferances + // gives mutually exclusive filters, so those are ignored + if ( $user->getBoolOption( 'watchlisthideanons' ) && + !$user->getBoolOption( 'watchlisthideliu' ) + ) { + $this->getFilterGroup( 'userExpLevel' ) + ->setDefault( 'registered' ); + } + + if ( $user->getBoolOption( 'watchlisthideliu' ) && + !$user->getBoolOption( 'watchlisthideanons' ) + ) { + $this->getFilterGroup( 'userExpLevel' ) + ->setDefault( 'unregistered' ); + } + $reviewStatus = $this->getFilterGroup( 'reviewStatus' ); if ( $reviewStatus !== null ) { // Conditional on feature being available and rights