// 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:
@@ -231,17 +231,6 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
if (!($obj = $this->loadObject(true)))
|
||||
return;
|
||||
|
||||
//Added values of object Shop
|
||||
if ($obj->id)
|
||||
{
|
||||
$assos = array();
|
||||
$sql = 'SELECT `id_group_shop`, `'.pSQL($this->identifier).'`
|
||||
FROM `'._DB_PREFIX_.pSQL($this->table).'_group_shop`
|
||||
WHERE `'.pSQL($this->identifier).'` = '.(int)$obj->id;
|
||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||
$this->fields_value['shop'][$row['id_group_shop']][] = $row[$this->identifier];
|
||||
}
|
||||
|
||||
return parent::initForm();
|
||||
}
|
||||
|
||||
@@ -339,17 +328,6 @@ class AdminAttributesGroupsControllerCore extends AdminController
|
||||
'id_attribute' => $this->getFieldValue($obj, 'id'),
|
||||
);
|
||||
|
||||
// Added values of object GroupShop
|
||||
if ($obj->id)
|
||||
{
|
||||
$assos = array();
|
||||
$sql = 'SELECT `id_group_shop`, `'.pSQL($this->identifier).'`
|
||||
FROM `'._DB_PREFIX_.pSQL($this->table).'_group_shop`
|
||||
WHERE `'.pSQL($this->identifier).'` = '.(int)$obj->id;
|
||||
foreach (Db::getInstance()->executeS($sql) as $row)
|
||||
$this->fields_value['shop'][$row['id_group_shop']][] = $row[$this->identifier];
|
||||
}
|
||||
|
||||
$str_attributes_groups = '';
|
||||
foreach ($attributes_groups as $attribute_group)
|
||||
$str_attributes_groups .= '"'.$attribute_group['id_attribute_group'].'" : '.($attribute_group['group_type'] == 'color' ? '1' : '0' ) .', ';
|
||||
|
||||
Reference in New Issue
Block a user