// fix retrieving of the fields value 'shop' and 'group_shop' dynamically (PSFV-94)

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10130 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
lLefevre
2011-11-15 12:19:39 +00:00
parent 45a3f8d33a
commit b9ee33bdcb
13 changed files with 24 additions and 103 deletions
@@ -326,7 +326,7 @@ class AdminManufacturersControllerCore extends AdminController
{
$this->fields_form['input'][] = array(
'type' => 'group_shop',
'label' => $this->l('Shop association:'),
'label' => $this->l('GroupShop association:'),
'name' => 'checkBoxShopAsso',
'values' => Shop::getTree()
);
@@ -359,17 +359,6 @@ class AdminManufacturersControllerCore extends AdminController
)), ENT_COMPAT, 'UTF-8');
}
//Added values of object Shop
if ($manufacturer->id)
{
$assos = array();
$sql = 'SELECT `id_group_shop`, `'.pSQL($this->identifier).'`
FROM `'._DB_PREFIX_.pSQL($this->table).'_group_shop`
WHERE `'.pSQL($this->identifier).'` = '.(int)$manufacturer->id;
foreach (Db::getInstance()->executeS($sql) as $row)
$this->fields_value['shop'][$row['id_group_shop']][] = $row[$this->identifier];
}
return parent::initForm();
}