[-] Core : Fix #PSCFV-4986

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17898 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2012-10-17 15:42:19 +00:00
parent ce06e3ca1d
commit 6c09e8328d
+10 -2
View File
@@ -302,7 +302,12 @@ class ConfigurationCore extends ObjectModel
$id_shop_group = Shop::getContextShopGroupID(true);
if (!is_array($values))
{
$is_i18n = false;
$values = array($values);
}
else
$is_i18n = true;
$result = true;
foreach ($values as $lang => $value)
@@ -364,10 +369,13 @@ class ConfigurationCore extends ObjectModel
));
}
}
Configuration::set($key, $value, $id_shop_group, $id_shop);
if (!$is_i18n)
Configuration::set($key, $value, $id_shop_group, $id_shop);
}
if ($is_i18n)
Configuration::set($key, $values, $id_shop_group, $id_shop);
return $result;
}