Merge "Use MediaWiki\SuppressWarnings around trigger_error('') instead @"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 432cfcc..0fc6e13 100644 (file)
@@ -111,15 +111,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
        }
 
        public static function checkStructuredFilterUiEnabled( Config $config, User $user ) {
-               if ( !$config->get( 'StructuredChangeFiltersOnWatchlist' ) ) {
-                       return false;
-               }
-
-               if ( $config->get( 'StructuredChangeFiltersShowWatchlistPreference' ) ) {
-                       return !$user->getOption( 'wlenhancedfilters-disable' );
-               } else {
-                       return $user->getOption( 'rcenhancedfilters' );
-               }
+               return !$user->getOption( 'wlenhancedfilters-disable' );
        }
 
        /**
@@ -163,7 +155,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                        'activeValue' => false,
                                        'default' => $this->getUser()->getBoolOption( 'extendwatchlist' ),
                                        'queryCallable' => function ( $specialClassName, $ctx, $dbr, &$tables,
-                                                                                                 &$fields, &$conds, &$query_options, &$join_conds ) {
+                                                       &$fields, &$conds, &$query_options, &$join_conds ) {
                                                $nonRevisionTypes = [ RC_LOG ];
                                                Hooks::run( 'SpecialWatchlistGetNonRevisionTypes', [ &$nonRevisionTypes ] );
                                                if ( $nonRevisionTypes ) {
@@ -219,7 +211,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        ],
                        'default' => ChangesListStringOptionsFilterGroup::NONE,
                        'queryCallable' => function ( $specialPageClassName, $context, $dbr,
-                                                                                 &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues ) {
+                                       &$tables, &$fields, &$conds, &$query_options, &$join_conds, $selectedValues ) {
                                if ( $selectedValues === [ 'seen' ] ) {
                                        $conds[] = $dbr->makeList( [
                                                'wl_notificationtimestamp IS NULL',
@@ -433,17 +425,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                );
        }
 
-       protected function runMainQueryHook( &$tables, &$fields, &$conds, &$query_options,
-               &$join_conds, $opts
-       ) {
-               return parent::runMainQueryHook( $tables, $fields, $conds, $query_options, $join_conds, $opts )
-                       && Hooks::run(
-                               'SpecialWatchlistQuery',
-                               [ &$conds, &$tables, &$join_conds, &$fields, $opts ],
-                               '1.23'
-                       );
-       }
-
        /**
         * Return a IDatabase object for reading
         *
@@ -671,7 +652,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        [
                                'selected' => $opts['namespace'],
                                'all' => '',
-                               'label' => $this->msg( 'namespace' )->text()
+                               'label' => $this->msg( 'namespace' )->text(),
+                               'in-user-lang' => true,
                        ], [
                                'name' => 'namespace',
                                'id' => 'namespace',