Merge d5bc24cf669f

This commit is contained in:
Heng Sin Low 2013-04-30 18:01:53 +08:00
commit e18d9ed666
1 changed files with 3 additions and 3 deletions

View File

@ -77,16 +77,16 @@ public class ChangeBaseLanguage extends SvrProcess
if (lang.isSystemLanguage())
throw new AdempiereUserError("Base language cannot be a system language");
MLanguage baselang = MLanguage.get(getCtx(), Language.getBaseAD_Language());
if (baselang.equals(p_Language))
if (Language.getBaseAD_Language().equals(p_Language))
throw new AdempiereUserError("Same base language");
// Disable the base flag on the actual
MLanguage baselang = MLanguage.get(getCtx(), Language.getBaseAD_Language());
baselang.setIsBaseLanguage(false);
baselang.saveEx(get_TrxName());
// Enable base flag on new language
lang.setIsBaseLanguage(false);
lang.setIsBaseLanguage(true);
lang.saveEx(get_TrxName());
Language.setBaseLanguage(p_Language);