X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;ds=sidebyside;f=languages%2FLanguage.php;h=e505b287e5f2cc2e054bb16217ee7ce0c366016c;hb=2828ef9f34d9f47ef896523b132661c280768ea9;hp=95bd31e34b184b78e897878a9346dd8a3ba6d56b;hpb=b93b64153d0cc4aa80782122a00db60a83b0daee;p=lhc%2Fweb%2Fwiklou.git diff --git a/languages/Language.php b/languages/Language.php index 95bd31e34b..e505b287e5 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -1880,7 +1880,7 @@ class Language { /** * Used by date() and time() to adjust the time output. * - * @param int $ts The time in date('YmdHis') format + * @param string $ts The time in date('YmdHis') format * @param mixed $tz Adjust the time by this amount (default false, mean we * get user timecorrection setting) * @return int @@ -1908,12 +1908,9 @@ class Language { $data[0] = 'Offset'; } - $minDiff = 0; if ( $data[0] == 'System' || $tz == '' ) { - #  Global offset in minutes. - if ( isset( $wgLocalTZoffset ) ) { - $minDiff = $wgLocalTZoffset; - } + # Global offset in minutes. + $minDiff = $wgLocalTZoffset; } elseif ( $data[0] == 'Offset' ) { $minDiff = intval( $data[1] ); } else { @@ -2023,7 +2020,7 @@ class Language { } /** - * @param mixed $ts The time format which needs to be turned into a + * @param string $ts The time format which needs to be turned into a * date('YmdHis') format with wfTimestamp(TS_MW,$ts) * @param bool $adj Whether to adjust the time output according to the * user configured offset ($timecorrection) @@ -2042,7 +2039,7 @@ class Language { } /** - * @param mixed $ts The time format which needs to be turned into a + * @param string $ts The time format which needs to be turned into a * date('YmdHis') format with wfTimestamp(TS_MW,$ts) * @param bool $adj Whether to adjust the time output according to the * user configured offset ($timecorrection) @@ -2061,7 +2058,7 @@ class Language { } /** - * @param mixed $ts The time format which needs to be turned into a + * @param string $ts The time format which needs to be turned into a * date('YmdHis') format with wfTimestamp(TS_MW,$ts) * @param bool $adj Whether to adjust the time output according to the * user configured offset ($timecorrection) @@ -2152,7 +2149,7 @@ class Language { * Internal helper function for userDate(), userTime() and userTimeAndDate() * * @param string $type Can be 'date', 'time' or 'both' - * @param mixed $ts The time format which needs to be turned into a + * @param string $ts The time format which needs to be turned into a * date('YmdHis') format with wfTimestamp(TS_MW,$ts) * @param User $user User object used to get preferences for timezone and format * @param array $options Array, can contain the following keys: @@ -3048,6 +3045,7 @@ class Language { /** * Get special page names, as an associative array * case folded alias => real name + * @return array */ function getSpecialPageAliases() { // Cache aliases because it may be slow to load them @@ -3983,9 +3981,11 @@ class Language { } /** + * @deprecated since 1.24, will be removed in 1.25 * @return Language */ function getLangObj() { + wfDeprecated( __METHOD__, '1.24' ); return $this; }