// Fix multi shop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11654 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
jBreux
2011-12-22 18:03:12 +00:00
parent 560903fefe
commit c45c357f56
+8 -7
View File
@@ -2302,13 +2302,14 @@ class AdminControllerCore extends Controller
return;
$assos = array();
foreach ($_POST['checkBox'.Tools::toCamelCase($type, true).'Asso_'.$table] as $id_asso_object => $row)
{
if (!(int)$id_asso_object)
$id_asso_object = $id_object;
foreach ($row as $id_shop => $value)
$assos[] = array('id_object' => (int)$id_asso_object, 'id_'.$type => (int)$id_shop);
}
if (isset($_POST['checkBox'.Tools::toCamelCase($type, true).'Asso_'.$table]))
foreach ($_POST['checkBox'.Tools::toCamelCase($type, true).'Asso_'.$table] as $id_asso_object => $row)
{
if (!(int)$id_asso_object)
$id_asso_object = $id_object;
foreach ($row as $id_shop => $value)
$assos[] = array('id_object' => (int)$id_asso_object, 'id_'.$type => (int)$id_shop);
}
return array($assos, $type);
}