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
}
$lang = $this->getLanguage();
- if ( $opts['days'] > 0 ) {
- $days = $opts['days'];
- } else {
- $days = $this->maxDays;
- }
$timestamp = wfTimestampNow();
$wlInfo = Html::rawElement(
'span',
'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";