From 5d07b90bbc141bd4ce9786ad951806e87f81d1fc Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Tue, 30 Mar 2021 15:24:21 +0200 Subject: [PATCH] Always fetch package information using the default language --- .../cronjob/GetUpdateInfoCronjob.class.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/cronjob/GetUpdateInfoCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/GetUpdateInfoCronjob.class.php index 589d9db380..379052d6a2 100644 --- a/wcfsetup/install/files/lib/system/cronjob/GetUpdateInfoCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/GetUpdateInfoCronjob.class.php @@ -1,7 +1,9 @@ refreshPackageDatabase([], true); + try { + $currentLanguage = WCF::getLanguage(); + // Always fetch package information using the default language. + if ($currentLanguage->languageID !== LanguageFactory::getInstance()->getDefaultLanguage()->languageID) { + WCF::setLanguage(LanguageFactory::getInstance()->getDefaultLanguage()); + } + + PackageUpdateDispatcher::getInstance()->refreshPackageDatabase([], true); + } + finally { + if ($currentLanguage->languageID !== LanguageFactory::getInstance()->getDefaultLanguage()->languageID) { + WCF::setLanguage($currentLanguage); + } + } } } } -- 2.20.1