// small fix
This commit is contained in:
@@ -142,14 +142,15 @@ class AttributeGroupCore extends ObjectModel
|
|||||||
if (!AttributeGroup::cleanDeadCombinations())
|
if (!AttributeGroup::cleanDeadCombinations())
|
||||||
return false;
|
return false;
|
||||||
/* Also delete related attributes */
|
/* Also delete related attributes */
|
||||||
if (Db::getInstance()->execute('
|
if (count($to_remove))
|
||||||
|
if (!Db::getInstance()->execute('
|
||||||
DELETE FROM `'._DB_PREFIX_.'attribute_lang`
|
DELETE FROM `'._DB_PREFIX_.'attribute_lang`
|
||||||
WHERE `id_attribute` IN ('.implode(',', $to_remove).')') === false ||
|
WHERE `id_attribute` IN ('.implode(',', $to_remove).')') ||
|
||||||
Db::getInstance()->execute('
|
!Db::getInstance()->execute('
|
||||||
DELETE FROM `'._DB_PREFIX_.'attribute_shop`
|
DELETE FROM `'._DB_PREFIX_.'attribute_shop`
|
||||||
WHERE `id_attribute` IN ('.implode(',', $to_remove).')') === false ||
|
WHERE `id_attribute` IN ('.implode(',', $to_remove).')') ||
|
||||||
Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id) === false)
|
!Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)$this->id))
|
||||||
return false;
|
return false;
|
||||||
$this->cleanPositions();
|
$this->cleanPositions();
|
||||||
}
|
}
|
||||||
$return = parent::delete();
|
$return = parent::delete();
|
||||||
|
|||||||
Reference in New Issue
Block a user