From b2ad614fd97c18a867b9fe4387e209fd438a15ad Mon Sep 17 00:00:00 2001 From: rMalie Date: Tue, 14 Feb 2012 13:50:04 +0000 Subject: [PATCH] // Remove shop url when a shop is deleted #PSTEST-747 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13304 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/shop/Shop.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/shop/Shop.php b/classes/shop/Shop.php index a9bea0c94..89c161ded 100644 --- a/classes/shop/Shop.php +++ b/classes/shop/Shop.php @@ -171,9 +171,10 @@ class ShopCore extends ObjectModel } // removes stock available - $res &= Db::getInstance()->execute(' - DELETE FROM '._DB_PREFIX_.'stock_available - WHERE id_shop = '.(int)$this->id); + $res &= Db::getInstance()->delete(_DB_PREFIX_.'stock_available', 'id_shop = '.(int)$this->id); + + // Remove urls + $res &= Db::getInstance()->delete(_DB_PREFIX_.'shop_url', 'id_shop = '.(int)$this->id); Shop::cacheShops(true);