From: Aaron Schulz Date: Sat, 24 Sep 2011 17:55:34 +0000 (+0000) Subject: Minor cleanup and line breaking to formatTimePeriod() X-Git-Tag: 1.31.0-rc.0~27445 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=9c1d8d1d653da2060d878983a6a11ac9e30f116a;p=lhc%2Fweb%2Fwiklou.git Minor cleanup and line breaking to formatTimePeriod() --- diff --git a/languages/Language.php b/languages/Language.php index c262bf18d2..6327caec37 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -3558,7 +3558,7 @@ class Language { */ function formatTimePeriod( $seconds, $format = array() ) { if ( !is_array( $format ) ) { - $format = array( 'avoid' => $format, 'noabbrevs' => false ); // For backwards compatibility + $format = array( 'avoid' => $format ); // For backwards compatibility } if ( !isset( $format['avoid'] ) ) { $format['avoid'] = false; @@ -3566,10 +3566,14 @@ class Language { if ( !isset( $format['noabbrevs' ] ) ) { $format['noabbrevs'] = false; } - $secondsMsg = wfMessage( $format['noabbrevs'] ? 'seconds' : 'seconds-abbrev' )->inLanguage( $this ); - $minutesMsg = wfMessage( $format['noabbrevs'] ? 'minutes' : 'minutes-abbrev' )->inLanguage( $this ); - $hoursMsg = wfMessage( $format['noabbrevs'] ? 'hours' : 'hours-abbrev' )->inLanguage( $this ); - $daysMsg = wfMessage( $format['noabbrevs'] ? 'days' : 'days-abbrev' )->inLanguage( $this ); + $secondsMsg = wfMessage( + $format['noabbrevs'] ? 'seconds' : 'seconds-abbrev' )->inLanguage( $this ); + $minutesMsg = wfMessage( + $format['noabbrevs'] ? 'minutes' : 'minutes-abbrev' )->inLanguage( $this ); + $hoursMsg = wfMessage( + $format['noabbrevs'] ? 'hours' : 'hours-abbrev' )->inLanguage( $this ); + $daysMsg = wfMessage( + $format['noabbrevs'] ? 'days' : 'days-abbrev' )->inLanguage( $this ); if ( round( $seconds * 10 ) < 100 ) { $s = $this->formatNum( sprintf( "%.1f", round( $seconds * 10 ) / 10 ) );