X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=languages%2FLanguage.php;h=c514cdc5952e19b08b997b220bc4e8d7dea33bba;hb=dceb5a9836ffe5a3840dfa2e54069c28936acc97;hp=12f26c3b9fa75898ffeb00e68485955bd3520e22;hpb=313dde5d06c42be1eb7da9127ec92bb5d360ddab;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 12f26c3b9f..c514cdc595 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -203,7 +203,7 @@ class Language { /** * Create a language object for a given language code * @param string $code - * @param $fallback boolean Whether we're going through language fallback chain + * @param bool $fallback Whether we're going through language fallback chain * @throws MWException * @return Language */ @@ -1092,7 +1092,7 @@ class Language { * YYYYMMDDHHMMSS * 01234567890123 * @param DateTimeZone $zone Timezone of $ts - * @param[out] int $ttl The amount of time (in seconds) the output may be cached for. + * @param int &$ttl The amount of time (in seconds) the output may be cached for. * Only makes sense if $ts is the current time. * @todo handling of "o" format character for Iranian, Hebrew, Hijri & Thai? * @@ -1584,9 +1584,9 @@ class Language { * @return int[] */ private static function tsToIranian( $ts ) { - $gy = substr( $ts, 0, 4 ) -1600; - $gm = substr( $ts, 4, 2 ) -1; - $gd = substr( $ts, 6, 2 ) -1; + $gy = substr( $ts, 0, 4 ) - 1600; + $gm = substr( $ts, 4, 2 ) - 1; + $gd = substr( $ts, 6, 2 ) - 1; # Days passed from the beginning (including leap years) $gDayNo = 365 * $gy @@ -1666,7 +1666,7 @@ class Language { (int)( ( 275 * $zm ) / 9 ) + $zd + 1729777; } - $zl = $zjd -1948440 + 10632; + $zl = $zjd - 1948440 + 10632; $zn = (int)( ( $zl - 1 ) / 10631 ); $zl = $zl - 10631 * $zn + 354; $zj = ( (int)( ( 10985 - $zl ) / 5316 ) ) * ( (int)( ( 50 * $zl ) / 17719 ) ) + @@ -3346,7 +3346,7 @@ class Language { if ( $start < 0 ) { $start = 0; } - $groupedNumber = substr( $number, $start, $end -$start ) . $groupedNumber; + $groupedNumber = substr( $number, $start, $end - $start ) . $groupedNumber; $end = $start; if ( $numMatches > 1 ) { // use the last pattern for the rest of the number @@ -4279,7 +4279,7 @@ class Language { * * @since 1.28 * @param Language $lang - * @return boolean + * @return bool */ public function equals( Language $lang ) { return $lang->getCode() === $this->mCode; @@ -4343,7 +4343,7 @@ class Language { /** * @param string $code - * @param boolean $fallback Whether we're going through language fallback chain + * @param bool $fallback Whether we're going through language fallback chain * @return string Name of the language class */ public static function classFromCode( $code, $fallback = true ) { @@ -4537,7 +4537,7 @@ class Language { public function formatExpiry( $expiry, $format = true, $infinity = 'infinity' ) { static $dbInfinity; if ( $dbInfinity === null ) { - $dbInfinity = wfGetDB( DB_SLAVE )->getInfinity(); + $dbInfinity = wfGetDB( DB_REPLICA )->getInfinity(); } if ( $expiry == '' || $expiry === 'infinity' || $expiry == $dbInfinity ) {