Merge "Avoid starting transactions in getHeartbeatData()"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 4824961..85ac2de 100644 (file)
@@ -52,6 +52,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $this->addHelpLink( 'Help:Watching pages' );
                $output->addModules( [
                        'mediawiki.special.changeslist.visitedstatus',
+                       'mediawiki.special.watchlist',
                ] );
 
                $mode = SpecialEditWatchlist::getMode( $request, $subpage );
@@ -130,7 +131,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
        }
 
        /**
-        * Get custom show/hide filters
+        * Get all custom filters
         *
         * @return array Map of filter URL param names to properties (msg/default)
         */
@@ -421,12 +422,6 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                $user = $this->getUser();
                $out = $this->getOutput();
 
-               // if the user wishes, that the watchlist is reloaded, whenever a filter changes,
-               // add the module for that
-               if ( $user->getBoolOption( 'watchlistreloadautomatically' ) ) {
-                       $out->addModules( [ 'mediawiki.special.watchlist' ] );
-               }
-
                $out->addSubtitle(
                        $this->msg( 'watchlistfor2', $user->getName() )
                                ->rawParams( SpecialEditWatchlist::buildTools(
@@ -465,9 +460,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        $filters['hidecategorization'] = 'wlshowhidecategorization';
                }
 
-               foreach ( $this->getCustomFilters() as $key => $params ) {
+               foreach ( $this->getRenderableCustomFilters( $this->getCustomFilters() ) as $key => $params ) {
                        $filters[$key] = $params['msg'];
                }
+
                // Disable some if needed
                if ( !$user->useRCPatrol() ) {
                        unset( $filters['hidepatrolled'] );
@@ -608,7 +604,8 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        $form .= Xml::openElement( 'form', [ 'method' => 'post',
                                'action' => $this->getPageTitle()->getLocalURL(),
                                'id' => 'mw-watchlist-resetbutton' ] ) . "\n" .
-                       Xml::submitButton( $this->msg( 'enotif_reset' )->text(), [ 'name' => 'dummy' ] ) . "\n" .
+                       Xml::submitButton( $this->msg( 'enotif_reset' )->text(),
+                               [ 'name' => 'mw-watchlist-reset-submit' ] ) . "\n" .
                        Html::hidden( 'reset', 'all' ) . "\n";
                        foreach ( $nondefaults as $key => $value ) {
                                $form .= Html::hidden( $key, $value ) . "\n";