// Merg// Merge -> revision 8395

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8397 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-09-07 16:23:13 +00:00
parent 5aab81dc66
commit 24e213cda8
27 changed files with 2801 additions and 617 deletions
+14 -2
View File
@@ -67,7 +67,16 @@ class AttributeGroupCore extends ObjectModel
public function add($autodate = true, $nullValues = false)
{
return parent::add($autodate, true);
$return = parent::add($autodate, true);
Module::hookExec('afterSaveAttributeGroup', array('id_attribute_group' => $this->id));
return $return;
}
public function update($nullValues = false)
{
$return = parent::update($nullValues);
Module::hookExec('afterSaveAttributeGroup', array('id_attribute_group' => $this->id));
return $return;
}
/**
@@ -111,7 +120,10 @@ class AttributeGroupCore extends ObjectModel
/* Also delete related attributes */
if (Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'attribute_lang` WHERE `id_attribute` IN (SELECT id_attribute FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)($this->id).')') === false OR Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.'attribute` WHERE `id_attribute_group` = '.(int)($this->id)) === false)
return false;
return parent::delete();
$return = parent::delete();
if($return)
Module::hookExec('afterDeleteAttributeGroup', array('id_attribute_group' => $this->id));
return $return;
}
/**