Commit 747859fe authored by jitendra's avatar jitendra

CRM-17714 - DB Error after upgradation to 4.7 beta3

parent e7479a6a
......@@ -88,6 +88,7 @@ class CRM_Core_BAO_ConfigSetting {
*/
public static function retrieve(&$defaults) {
$domain = new CRM_Core_DAO_Domain();
$isUpgrade = CRM_Core_Config::isUpgradeMode();
//we are initializing config, really can't use, CRM-7863
$urlVar = 'q';
......@@ -95,12 +96,9 @@ class CRM_Core_BAO_ConfigSetting {
$urlVar = 'task';
}
if (CRM_Core_Config::isUpgradeMode()) {
if ($isUpgrade && CRM_Core_DAO::checkFieldExists('civicrm_domain', 'config_backend')) {
$domain->selectAdd('config_backend');
}
else {
$domain->selectAdd('config_backend, locales');
}
$domain->id = CRM_Core_Config::domainID();
$domain->find(TRUE);
......@@ -118,7 +116,9 @@ class CRM_Core_BAO_ConfigSetting {
}
}
CRM_Core_BAO_ConfigSetting::applyLocale(Civi::settings($domain->id), $domain->locales);
if (!$isUpgrade) {
CRM_Core_BAO_ConfigSetting::applyLocale(Civi::settings($domain->id), $domain->locales);
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment