Merge "Support uploads with UTF-8 names on Windows"
[lhc/web/wiklou.git] / includes / Status.php
index 07828fe..5456ed0 100644 (file)
@@ -113,7 +113,7 @@ class Status extends StatusValue {
         *     1 => object(Status) # The Status with warning messages, only
         * ]
         *
-        * @return array
+        * @return Status[]
         */
        public function splitByErrorType() {
                list( $errorsOnlyStatus, $warningsOnlyStatus ) = parent::splitByErrorType();
@@ -153,12 +153,9 @@ class Status extends StatusValue {
         * @return Language
         */
        protected function languageFromParam( $lang ) {
-               global $wgLang;
-
                if ( $lang === null ) {
-                       // @todo: Use RequestContext::getMain()->getLanguage() instead
-                       return $wgLang;
-               } elseif ( $lang instanceof Language || $lang instanceof StubUserLang ) {
+                       return RequestContext::getMain()->getLanguage();
+               } elseif ( $lang instanceof Language ) {
                        return $lang;
                } else {
                        return Language::factory( $lang );