Merge "mediawiki.searchSuggest: Enable result caching"
[lhc/web/wiklou.git] / languages / Language.php
index 95bd31e..e505b28 100644 (file)
@@ -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;
        }