to enhance preference grouping.
* (bug 23298) Interwiki links with prefix only in log summaries now link to the
correct link
+* (bug 23284) Times are now rounded correctly
=== API changes in 1.17 ===
* (bug 22738) Allow filtering by action type on query=logevent
} elseif ( $seconds < 60 ) {
return $this->formatNum( round( $seconds ) ) . ' ' . wfMsg( 'seconds-abbrev' );
} elseif ( $seconds < 3600 ) {
- return $this->formatNum( floor( $seconds / 60 ) ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' .
- $this->formatNum( round( fmod( $seconds, 60 ) ) ) . ' ' . wfMsg( 'seconds-abbrev' );
+ $minutes = floor( $seconds / 60 );
+ $secondsPart = round( fmod( $seconds, 60 ) );
+ if ( $secondsPart == 60 ) {
+ $secondsPart = 0;
+ $minutes++;
+ }
+ return $this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' .
+ $this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' );
} else {
$hours = floor( $seconds / 3600 );
$minutes = floor( ( $seconds - $hours * 3600 ) / 60 );
$secondsPart = round( $seconds - $hours * 3600 - $minutes * 60 );
+ if ( $secondsPart == 60 ) {
+ $secondsPart = 0;
+ $minutes++;
+ }
+ if ( $minutes == 60 ) {
+ $minutes = 0;
+ $hours++;
+ }
return $this->formatNum( $hours ) . ' ' . wfMsg( 'hours-abbrev' ) . ' ' .
$this->formatNum( $minutes ) . ' ' . wfMsg( 'minutes-abbrev' ) . ' ' .
$this->formatNum( $secondsPart ) . ' ' . wfMsg( 'seconds-abbrev' );