From 5a96ffbd647ee3428c72039110db6df3eec148ba Mon Sep 17 00:00:00 2001 From: vChabot Date: Thu, 10 May 2012 14:09:11 +0000 Subject: [PATCH] [-] BO : BugFix : #PSCFV-2209 : Multishop : cannot delete shops with dependencies --- .../shop/helpers/list/list_action_delete.tpl | 33 +++++++++++++++++++ classes/helper/HelperList.php | 1 + controllers/admin/AdminShopController.php | 2 +- 3 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 admin-dev/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl diff --git a/admin-dev/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl b/admin-dev/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl new file mode 100644 index 000000000..b8083d1cc --- /dev/null +++ b/admin-dev/themes/default/template/controllers/shop/helpers/list/list_action_delete.tpl @@ -0,0 +1,33 @@ +{* +* 2007-2012 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2012 PrestaShop SA +* @version Release: $Revision: 9197 $ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + + {$action} + \ No newline at end of file diff --git a/classes/helper/HelperList.php b/classes/helper/HelperList.php index 785f07600..7b89fdc75 100644 --- a/classes/helper/HelperList.php +++ b/classes/helper/HelperList.php @@ -456,6 +456,7 @@ class HelperListCore extends Helper $name = '\n\n'.self::$cache_lang['Name'].' '.$name; $data = array( + $this->identifier => $id, 'href' => Tools::safeOutput($this->currentIndex.'&'.$this->identifier.'='.$id.'&delete'.$this->table.'&token='.($token != null ? $token : $this->token)), 'action' => self::$cache_lang['Delete'], ); diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index cdda64568..b7915bc8e 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -275,7 +275,7 @@ class AdminShopControllerCore extends AdminController if (Shop::hasDependency($shop['id_shop'])) $shop_delete_list[] = $shop['id_shop']; } - $this->addRowActionSkipList('delete', $shop_delete_list); + $this->context->smarty->assign('shops_having_dependencies', $shop_delete_list); } public function renderForm()