X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=blobdiff_plain;f=languages%2FLanguage.php;h=1c2e4f11890dd537c0c89b40fbee6c1182c13d1b;hb=9c5174669eecd1b8729e99b0d96750db26bf94f6;hp=aa287e926ab6ea154682ab5db8f3916331a98858;hpb=cb30399b4d03bc78e0abec0baad4b4fca7de198c;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index aa287e926a..1c2e4f1189 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1833,22 +1833,19 @@ class Language { while ( $hebrewMonth <= 12 ) { # Calculate days in this month if ( $isLeap && $hebrewMonth == 6 ) { - # Adar in a leap year - if ( $isLeap ) { - # Leap year - has Adar I, with 30 days, and Adar II, with 29 days - $days = 30; + # Leap year - has Adar I, with 30 days, and Adar II, with 29 days + $days = 30; + if ( $hebrewDay <= $days ) { + # Day in Adar I + $hebrewMonth = 13; + } else { + # Subtract the days of Adar I + $hebrewDay -= $days; + # Try Adar II + $days = 29; if ( $hebrewDay <= $days ) { - # Day in Adar I - $hebrewMonth = 13; - } else { - # Subtract the days of Adar I - $hebrewDay -= $days; - # Try Adar II - $days = 29; - if ( $hebrewDay <= $days ) { - # Day in Adar II - $hebrewMonth = 14; - } + # Day in Adar II + $hebrewMonth = 14; } } } elseif ( $hebrewMonth == 2 && $yearPattern == 2 ) { @@ -2192,7 +2189,7 @@ class Language { } # No difference ? Return time unchanged - if ( 0 == $minDiff ) { + if ( $minDiff == 0 ) { return $ts; } @@ -4241,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 ) ); } /**