dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "rdbms: Avoid selectDB() call in LoadMonitor new connections"
[lhc/web/wiklou.git]
/
languages
/
Language.php
diff --git
a/languages/Language.php
b/languages/Language.php
index
12f26c3
..
c514cdc
100644
(file)
--- 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
/**
* 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
*/
* @throws MWException
* @return Language
*/
@@
-1092,7
+1092,7
@@
class Language {
* YYYYMMDDHHMMSS
* 01234567890123
* @param DateTimeZone $zone Timezone of $ts
* 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?
*
* 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 ) {
* @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
# Days passed from the beginning (including leap years)
$gDayNo = 365 * $gy
@@
-1666,7
+1666,7
@@
class Language {
(int)( ( 275 * $zm ) / 9 ) + $zd + 1729777;
}
(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 ) ) +
$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;
}
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
$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
*
* @since 1.28
* @param Language $lang
- * @return bool
ean
+ * @return bool
*/
public function equals( Language $lang ) {
return $lang->getCode() === $this->mCode;
*/
public function equals( Language $lang ) {
return $lang->getCode() === $this->mCode;
@@
-4343,7
+4343,7
@@
class Language {
/**
* @param string $code
/**
* @param string $code
- * @param bool
ean
$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 ) {
* @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 ) {
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 ) {
}
if ( $expiry == '' || $expiry === 'infinity' || $expiry == $dbInfinity ) {