Bartosz Dziewoński has uploaded a new change for review.
https://gerrit.wikimedia.org/r/266072
Change subject: SpecialWatchlist: Display actual number of days for the "all"
option
......................................................................
SpecialWatchlist: Display actual number of days for the "all" option
Bug: T120416
Change-Id: Icff5f9550ea27cde6d1c6ea42bb6ab89bf2b8616
---
M includes/specials/SpecialWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 12 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/72/266072/1
diff --git a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index 20dde01..6ebe9a8 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -532,9 +532,19 @@
$days[] = $userWatchlistOption;
}
+ $maxDays = (string)( $this->getConfig()->get( 'RCMaxAge' ) / (
3600 * 24 ) );
+ // add the maximum possible value, if it isn't available already
+ if ( !in_array( $maxDays, $days ) ) {
+ $days[] = $maxDays;
+ }
+
$selected = (string)$options['days'];
+ if ( $selected <= 0 ) {
+ $selected = $maxDays;
+ }
+
// add the currently selected value, if it isn't available
already
- if ( !in_array( $selected, $days ) && $selected !== '0' ) {
+ if ( !in_array( $selected, $days ) ) {
$days[] = $selected;
}
@@ -549,11 +559,6 @@
}
$select->addOption( $name, $value );
}
-
- // 'all' option
- $name = $this->msg( 'watchlistall2' )->text();
- $value = '0';
- $select->addOption( $name, $value );
return $select->getHTML() . "\n<br />\n";
}
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index cfb7d54..cbf7971 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -2023,7 +2023,6 @@
"wlheader-showupdated": "Pages that have been changed since you last
visited them are shown in <strong>bold</strong>.",
"wlnote": "Below {{PLURAL:$1|is the last change|are the last
<strong>$1</strong> changes}} in the last {{PLURAL:$2|hour|<strong>$2</strong>
hours}}, as of $3, $4.",
"wlshowlast": "Show last $1 hours $2 days",
- "watchlistall2": "all",
"watchlist-hide": "Hide",
"watchlist-submit": "Show",
"wlshowtime": "Period of time to display:",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index f9b5120..12ac93b 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -2198,10 +2198,9 @@
"wlheader-showupdated": "Message at the top of [[Special:Watchlist]],
after {{msg-mw|watchlist-details}}. Has to be a full sentence.",
"wlnote": "Used on [[Special:Watchlist]] when a maximum number of hours
or days is specified.\n\nParameters:\n* $1 - the number of changes shown\n* $2
- the number of hours for which the changes are shown\n* $3 - a date alone\n*
$4 - a time alone",
"wlshowlast": "Appears on [[Special:Watchlist]]. Parameters:\n* $1 - a
choice of different numbers of hours (\"1 | 2 | 6 | 12\")\n* $2 - a choice of
different numbers of days (\"1 | 3 | 7\" and the maximum number of days
available)\nClicking on your choice changes the list of changes you see
(without changing the default in my preferences).",
- "watchlistall2": "Appears on [[Special:Watchlist]], after
{{msg-mw|wlshowtime}}, as the option to display all available data regardless
of age.\n{{Identical|All}}",
"watchlist-hide": "Appears on [[Special:Watchlist]]. It is the first
word on a new line with checkboxes to hide/unhide options\n{{Identical|Hide}}",
"watchlist-submit": "Label on the submit button in
[[Special:Watchlist]]\n{{Identical|Show}}",
- "wlshowtime": "Appears on [[Special:Watchlist]]. Label of a drop-down
list used to specify the period of time to display in the watchlist. This
period can be {{msg-mw|days}}, {{msg-mw|hours}}, or {{msg-mw|watchlistall2}}.",
+ "wlshowtime": "Appears on [[Special:Watchlist]]. Label of a drop-down
list used to specify the period of time to display in the watchlist. This
period can be {{msg-mw|days}} or {{msg-mw|hours}}.",
"wlshowhideminor": "Option text in [[Special:Watchlist]]. Cf.
{{msg-mw|rcshowhideminor}}.\n{{Identical|Minor edit}}",
"wlshowhidebots": "Option text in [[Special:Watchlist]]. Cf.
{{msg-mw|rcshowhidebots}}.\n{{Identical|Bot}}",
"wlshowhideliu": "Option text in [[Special:Watchlist]]. Cf.
{{msg-mw|rcshowhideliu}}.\n{{Identical|Registered user}}",
--
To view, visit https://gerrit.wikimedia.org/r/266072
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icff5f9550ea27cde6d1c6ea42bb6ab89bf2b8616
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits