Merge "Remove old "bulletin board style toolbar" from core"
[lhc/web/wiklou.git] / languages / Language.php
index e75ea1a..dad9c6c 100644 (file)
@@ -814,22 +814,6 @@ class Language {
                return self::$dataCache->getItem( $this->mCode, 'datePreferenceMigrationMap' );
        }
 
-       /**
-        * @param string $image
-        * @return array|null
-        */
-       function getImageFile( $image ) {
-               return self::$dataCache->getSubitem( $this->mCode, 'imageFiles', $image );
-       }
-
-       /**
-        * @return array
-        * @since 1.24
-        */
-       public function getImageFiles() {
-               return self::$dataCache->getItem( $this->mCode, 'imageFiles' );
-       }
-
        /**
         * @return array
         */
@@ -4263,14 +4247,17 @@ class Language {
        }
 
        /**
-        * Check if the language has the specific variant
+        * Strict check if the language has the specific variant.
+        *
+        * Compare to LanguageConverter::validateVariant() which does a more
+        * lenient check and attempts to coerce the given code to a valid one.
         *
         * @since 1.19
         * @param string $variant
         * @return bool
         */
        public function hasVariant( $variant ) {
-               return (bool)$this->mConverter->validateVariant( $variant );
+               return $variant && ( $variant === $this->mConverter->validateVariant( $variant ) );
        }
 
        /**