X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=ef9137dc3741025945386788f9eecbb8c984b736;hb=d1c808c3615e0be250890359da12aabc14b08733;hp=0efade9f62d178664f857cb01bc651226d7dd73a;hpb=954327b642fcf869aab7fa75dd58a82935f9d2e1;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 0efade9f62..ef9137dc37 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1421,7 +1421,7 @@ class Language { case 'g': $usedHour = true; $h = substr( $ts, 8, 2 ); - $num = $h % 12 ? $h % 12 : 12; + $num = $h % 12 ?: 12; break; case 'G': $usedHour = true; @@ -1430,7 +1430,7 @@ class Language { case 'h': $usedHour = true; $h = substr( $ts, 8, 2 ); - $num = sprintf( '%02d', $h % 12 ? $h % 12 : 12 ); + $num = sprintf( '%02d', $h % 12 ?: 12 ); break; case 'H': $usedHour = true; @@ -2189,7 +2189,7 @@ class Language { } # No difference ? Return time unchanged - if ( 0 == $minDiff ) { + if ( $minDiff == 0 ) { return $ts; } @@ -4238,12 +4238,11 @@ class Language { /** * Perform output conversion on a string, and encode for safe HTML output. * @param string $text Text to be converted - * @param bool $isTitle Whether this conversion is for the article title * @return string * @todo this should get integrated somewhere sane */ - public function convertHtml( $text, $isTitle = false ) { - return htmlspecialchars( $this->convert( $text, $isTitle ) ); + public function convertHtml( $text ) { + return htmlspecialchars( $this->convert( $text ) ); } /**