[-] BO : #PSTEST-1032 : Fix bug

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14194 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre committed 2012-03-15 13:11:30 +00:00
1 parent ca997f7a0a
commit 1b3341aff5
1 file changed
+8 -2
@@ -191,12 +191,18 @@ class AdminTranslationsControllerCore extends AdminController
{ {
if ($fd = fopen($path, 'w')) if ($fd = fopen($path, 'w'))
{ {
unset($_POST['submitTranslations'.$type], $_POST['lang']); // Unset all POST which are not translations
unset($_POST['token']); unset(
$_POST['submitTranslations'.Tools::toCamelCase($type, true)],
$_POST['lang'],
$_POST['token']
);
$to_insert = array(); $to_insert = array();
foreach ($_POST as $key => $value) foreach ($_POST as $key => $value)
if (!empty($value)) if (!empty($value))
$to_insert[$key] = $value; $to_insert[$key] = $value;
// translations array is ordered by key (easy merge) // translations array is ordered by key (easy merge)
ksort($to_insert); ksort($to_insert);
$tab = ($fullmark ? Tools::strtoupper($fullmark) : 'LANG').($mark ? Tools::strtoupper($mark) : ''); $tab = ($fullmark ? Tools::strtoupper($fullmark) : 'LANG').($mark ? Tools::strtoupper($mark) : '');