Get the language directly without accessing the cache and ignore the `isDisabled...
authorCyperghost <olaf_schmitz_1@t-online.de>
Mon, 30 Sep 2024 08:14:04 +0000 (10:14 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Mon, 30 Sep 2024 08:14:04 +0000 (10:14 +0200)
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php

index e1480431c48217801c90f315560ae2e638d4cb4e..15ed8fa6666070b6b58c302621ea0a87e2f686e6 100644 (file)
@@ -797,7 +797,12 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         $languageCode = self::readLanguageCodeFromXML($xml);
 
         // try to find an existing language with the given language code
-        $language = LanguageFactory::getInstance()->getLanguageByCode($languageCode);
+        $sql = "SELECT *
+                FROM   wcf1_language
+                WHERE  languageCode = ?";
+        $statement = WCF::getDB()->prepare($sql);
+        $statement->execute([$languageCode]);
+        $language = $statement->fetchObject(Language::class);
 
         // create new language
         if ($language === null) {