// Shop association improvements

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10298 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rGaillard
2011-11-20 17:13:36 +00:00
parent d57b3cbcd7
commit 53d85ae134
+8
View File
@@ -366,6 +366,14 @@ abstract class ObjectModelCore
if (method_exists($this, 'getTranslationsFieldsChild'))
Db::getInstance()->execute('DELETE FROM `'.pSQL(_DB_PREFIX_.$this->table).'_lang` WHERE `'.pSQL($this->identifier).'` = '.(int)($this->id));
$assos = Shop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'shop')
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$this->table.'_shop` WHERE `'.$this->identifier.'`='.(int)$this->id);
$assos = GroupShop::getAssoTables();
if (isset($assos[$this->table]) && $assos[$this->table]['type'] == 'group_shop')
Db::getInstance()->Execute('DELETE FROM `'._DB_PREFIX_.$this->table.'group_shop` WHERE `'.$this->identifier.'`='.(int)$this->id);
/* Hook */
Hook::exec('actionObject'.get_class($this).'DeleteAfter');