Web App Gallery Installer problems with select language fixed
This commit is contained in:
parent
07f6ab46df
commit
edcb079ad9
1 changed files with 22 additions and 2 deletions
|
@ -520,7 +520,7 @@ namespace WebsitePanel.Server.Code
|
||||||
{
|
{
|
||||||
|
|
||||||
Product app = GetProduct(appId);
|
Product app = GetProduct(appId);
|
||||||
Installer appInstaller = app.GetInstaller(GetLanguage(languageId));
|
Installer appInstaller = GetInstaller(languageId, app);
|
||||||
WpiAppInstallLogger logger = new WpiAppInstallLogger();
|
WpiAppInstallLogger logger = new WpiAppInstallLogger();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -586,6 +586,25 @@ namespace WebsitePanel.Server.Code
|
||||||
return !logger.IsFailed;
|
return !logger.IsFailed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Installer GetInstaller(string languageId, Product product)
|
||||||
|
{
|
||||||
|
Installer installer = product.GetInstaller(GetLanguage(languageId));
|
||||||
|
if (null == installer)
|
||||||
|
{
|
||||||
|
installer = product.GetInstaller(GetLanguage(DeafultLanguage));
|
||||||
|
if (null == installer)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
string.Format(
|
||||||
|
"Could not get installer for product '{0}', language: {1}, default language: {2}",
|
||||||
|
product.Title, languageId, DeafultLanguage)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return installer;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion Public interface
|
#endregion Public interface
|
||||||
|
@ -701,10 +720,11 @@ namespace WebsitePanel.Server.Code
|
||||||
|
|
||||||
private List<Installer> GetInstallers(List<Product> productsToInstall, Language lang)
|
private List<Installer> GetInstallers(List<Product> productsToInstall, Language lang)
|
||||||
{
|
{
|
||||||
|
Language defaultLang = GetLanguage(DeafultLanguage);
|
||||||
List<Installer> installersToUse = new List<Installer>();
|
List<Installer> installersToUse = new List<Installer>();
|
||||||
foreach (Product product in productsToInstall)
|
foreach (Product product in productsToInstall)
|
||||||
{
|
{
|
||||||
Installer installer = product.GetInstaller(lang);
|
Installer installer = product.GetInstaller(lang) ?? product.GetInstaller(defaultLang);
|
||||||
if (null != installer)
|
if (null != installer)
|
||||||
{
|
{
|
||||||
installersToUse.Add(installer);
|
installersToUse.Add(installer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue