From 3dc3285de1007215503f2ea38f73e2ec4252bded 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 --- 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);