Anomie has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/380953 )
Change subject: Fix watchlist "in the last X hours" display
......................................................................
Fix watchlist "in the last X hours" display
If6280ad6 changed the interpretation of the URL parameter "days=0" (or
any negative value) from meaning "maximum number of days" to actually
meaning "0 days". That's a somewhat annoying breaking change, but easily
worked around by updating bookmarks.
But it didn't update the display on the page, so despite querying 0 days
it would still incorrectly say something like "in the last 720 hours"
rather than "in the last 0 hours".
Bug: T176857
Change-Id: I90c79ef9c4819a34060515b863277fd185828ed9
---
M includes/specials/SpecialWatchlist.php
1 file changed, 1 insertion(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/53/380953/1
diff --git a/includes/specials/SpecialWatchlist.php
b/includes/specials/SpecialWatchlist.php
index 531184b..8a47486 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -608,11 +608,6 @@
}
$lang = $this->getLanguage();
- if ( $opts['days'] > 0 ) {
- $days = $opts['days'];
- } else {
- $days = $this->maxDays;
- }
$timestamp = wfTimestampNow();
$wlInfo = Html::rawElement(
'span',
@@ -620,7 +615,7 @@
'class' => 'wlinfo',
'data-params' => json_encode( [ 'from' =>
$timestamp ] ),
],
- $this->msg( 'wlnote' )->numParams( $numRows, round(
$days * 24 ) )->params(
+ $this->msg( 'wlnote' )->numParams( $numRows, round(
$opts['days'] * 24 ) )->params(
$lang->userDate( $timestamp, $user ),
$lang->userTime( $timestamp, $user )
)->parse()
) . "<br />\n";
--
To view, visit https://gerrit.wikimedia.org/r/380953
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I90c79ef9c4819a34060515b863277fd185828ed9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits