Improved error handling and localization

SVN:trunk[437]
This commit is contained in:
Romain Quetiez
2010-06-07 14:28:42 +00:00
parent dc2430332a
commit d3ffa21943
3 changed files with 23 additions and 9 deletions

View File

@@ -2935,6 +2935,15 @@ abstract class MetaModel
self::$m_bLogWebService = false;
}
// Note: load the dictionary as soon as possible, because it might be
// needed when some error occur
foreach ($oConfig->GetDictionaries() as $sModule => $sToInclude)
{
self::Plugin($sConfigFile, 'dictionaries', $sToInclude);
}
// Set the language... after the dictionaries have been loaded!
Dict::SetDefaultLanguage($oConfig->GetDefaultLanguage());
foreach ($oConfig->GetAppModules() as $sModule => $sToInclude)
{
self::Plugin($sConfigFile, 'application', $sToInclude);
@@ -2947,12 +2956,6 @@ abstract class MetaModel
{
self::Plugin($sConfigFile, 'addons', $sToInclude);
}
foreach ($oConfig->GetDictionaries() as $sModule => $sToInclude)
{
self::Plugin($sConfigFile, 'dictionaries', $sToInclude);
}
// Set the language... after the dictionaries have been loaded!
Dict::SetDefaultLanguage($oConfig->GetDefaultLanguage());
$sServer = $oConfig->GetDBHost();
$sUser = $oConfig->GetDBUser();