From: Bartosz DziewoƄski Date: Fri, 4 Dec 2015 15:51:22 +0000 (+0100) Subject: SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen X-Git-Tag: 1.31.0-rc.0~8779^2 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6e006bd03cb56680f507dfcc515cce52ecc2eb24;p=lhc%2Fweb%2Fwiklou.git SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen Follow-up to f3daab99f71eb3e41ae472deb8a71d7d6cbd42db. Change-Id: I6ffc9b93bc1bd6111224c06f124b1bd01107bbd5 --- 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";