From 4511b4d2f2b660590f89041cf9cf077fdf665ecd Mon Sep 17 00:00:00 2001 From: vChabot Date: Tue, 31 Jan 2012 15:29:35 +0000 Subject: [PATCH] // norm fix --- controllers/admin/AdminShopController.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index 5470859e0..31a22b4bf 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -96,7 +96,7 @@ class AdminShopControllerCore extends AdminController if ((bool)$shop->id) { // adding button for delete this shop - if ($this->tabAccess['delete'] && $this->display != 'add' && !Shop::has_dependency($shop->id)) + if ($this->tabAccess['delete'] && $this->display != 'add' && !Shop::hasDependency($shop->id)) $this->toolbar_btn['delete'] = array( 'short' => 'Delete', 'href' => $this->context->link->getAdminLink('AdminShop').'&id_shop='.$shop->id.'&deleteshop', @@ -209,14 +209,14 @@ class AdminShopControllerCore extends AdminController { if (!Validate::isLoadedObject($object = $this->loadObject())) $this->errors[] = Tools::displayError('Unable to load this shop.'); - else if (!Shop::has_dependency($object->id)) + else if (!Shop::hasDependency($object->id)) return Category::deleteCategoriesFromShop($object->id) && parent::processDelete($token); else $this->errors[] = Tools::displayError('You can\'t delete this shop (customer and/or order dependency)'); return false; } - + public function afterAdd($new_shop) { if (Tools::getValue('useImportData') && ($import_data = Tools::getValue('importData')) && is_array($import_data)) @@ -240,7 +240,7 @@ class AdminShopControllerCore extends AdminController // don't allow to remove shop which have dependencies (customers / orders / ... ) foreach ($this->_list as $shop) { - if (Shop::has_dependency($shop['id_shop'])) + if (Shop::hasDependency($shop['id_shop'])) $shop_delete_list[] = $shop['id_shop']; } $this->addRowActionSkipList('delete', $shop_delete_list);