X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=dda1dac3af9340695b7a425af85c575a9af675dd;hb=4660ce079ca78a66e4ec7386481868a52ecebda5;hp=7b3f25c8382e184e43955c659024c0ebaaca9bda;hpb=12ff4dec05ff8bb1a1910bf6745155b93e1912b5;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 7b3f25c838..dda1dac3af 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -22,7 +22,7 @@ */ use MediaWiki\MediaWikiServices; -use Wikimedia\Rdbms\ResultWrapper; +use Wikimedia\Rdbms\IResultWrapper; use Wikimedia\Rdbms\IDatabase; /** @@ -264,8 +264,12 @@ class SpecialWatchlist extends ChangesListSpecialPage { $reviewStatus = $this->getFilterGroup( 'reviewStatus' ); if ( $reviewStatus !== null ) { // Conditional on feature being available and rights - $hidePatrolled = $reviewStatus->getFilter( 'hidepatrolled' ); - $hidePatrolled->setDefault( $user->getBoolOption( 'watchlisthidepatrolled' ) ); + if ( $user->getBoolOption( 'watchlisthidepatrolled' ) ) { + $reviewStatus->setDefault( 'unpatrolled' ); + $legacyReviewStatus = $this->getFilterGroup( 'legacyReviewStatus' ); + $legacyHidePatrolled = $legacyReviewStatus->getFilter( 'hidepatrolled' ); + $legacyHidePatrolled->setDefault( true ); + } } $authorship = $this->getFilterGroup( 'authorship' ); @@ -477,7 +481,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { /** * Build and output the actual changes list. * - * @param ResultWrapper $rows Database rows + * @param IResultWrapper $rows Database rows * @param FormOptions $opts */ public function outputChangesList( $rows, $opts ) {