$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;
}
$select->addOption( $name, $value );
}
- // 'all' option
- $name = $this->msg( 'watchlistall2' )->text();
- $value = '0';
- $select->addOption( $name, $value );
-
return $select->getHTML() . "\n<br />\n";
}
"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:",
"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}}",