// Fixed sql error that occurred in the module duplication when you add a new shop in multishop

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@16947 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dMetzger committed 2012-08-22 08:58:38 +00:00
1 parent 03124ab1ef
commit 7e8847ff97
2 files changed
+8 -10

No files matched your search

+4 -5
View File
@@ -741,10 +741,9 @@ class BlockCms extends Module
public function hookActionShopDataDuplication($params)
{
Db::getInstance()->execute('
INSERT INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
FROM '._DB_PREFIX_.'cms_block_shop
WHERE id_shop = '.(int)$params['old_id_shop'].'
');
INSERT IGNORE INTO '._DB_PREFIX_.'cms_block_shop (id_cms_block, id_shop)
SELECT id_cms_block, '.(int)$params['new_id_shop'].'
FROM '._DB_PREFIX_.'cms_block_shop
WHERE id_shop = '.(int)$params['old_id_shop']);
}
}