From 6e006bd03cb56680f507dfcc515cce52ecc2eb24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20Dziewo=C5=84ski?= Date: Fri, 4 Dec 2015 16:51:22 +0100 Subject: [PATCH] SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen Follow-up to f3daab99f71eb3e41ae472deb8a71d7d6cbd42db. Change-Id: I6ffc9b93bc1bd6111224c06f124b1bd01107bbd5 --- includes/specials/SpecialWatchlist.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 34c44d49b8..8fdfda281d 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -523,13 +523,13 @@ class SpecialWatchlist extends ChangesListSpecialPage { $userWatchlistOption = (string)$this->getUser()->getOption( 'watchlistdays' ); // add the user preference, if it isn't available already - if ( !in_array( $userWatchlistOption, $days ) ) { + if ( !in_array( $userWatchlistOption, $days ) && $userWatchlistOption !== '0' ) { $days[] = $userWatchlistOption; } $selected = (string)$options['days']; // add the currently selected value, if it isn't available already - if ( !in_array( $selected, $days ) ) { + if ( !in_array( $selected, $days ) && $selected !== '0' ) { $days[] = $selected; } @@ -547,7 +547,7 @@ class SpecialWatchlist extends ChangesListSpecialPage { // 'all' option $name = $this->msg( 'watchlistall2' )->text(); - $value = 0; + $value = '0'; $select->addOption( $name, $value ); return $select->getHTML() . "\n
\n"; -- 2.20.1