jenkins-bot has submitted this change and it was merged.

Change subject: SpecialWatchlist: Don't display '0' in the selector when 'all' 
is chosen
......................................................................


SpecialWatchlist: Don't display '0' in the selector when 'all' is chosen

Follow-up to f3daab99f71eb3e41ae472deb8a71d7d6cbd42db.

Change-Id: I6ffc9b93bc1bd6111224c06f124b1bd01107bbd5
---
M includes/specials/SpecialWatchlist.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Florianschmidtwelzow: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 34c44d4..8fdfda2 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -523,13 +523,13 @@
 
                $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 @@
 
                // 'all' option
                $name = $this->msg( 'watchlistall2' )->text();
-               $value = 0;
+               $value = '0';
                $select->addOption( $name, $value );
 
                return $select->getHTML() . "\n<br />\n";

-- 
To view, visit https://gerrit.wikimedia.org/r/256953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ffc9b93bc1bd6111224c06f124b1bd01107bbd5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to