From e2e5fbe33a34822f9d2d89d624cca07e1740f1a1 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Mon, 12 Aug 2013 15:25:26 +0200 Subject: [PATCH] //now you can delete all carriers --- controllers/admin/AdminCarriersController.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/controllers/admin/AdminCarriersController.php b/controllers/admin/AdminCarriersController.php index 8f4ad9a35..53a7efa29 100644 --- a/controllers/admin/AdminCarriersController.php +++ b/controllers/admin/AdminCarriersController.php @@ -470,7 +470,8 @@ class AdminCarriersControllerCore extends AdminController } parent::postProcess(); } - else if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) + /* +else if ((isset($_GET['status'.$this->table]) || isset($_GET['status'])) && Tools::getValue($this->identifier)) { if ($this->tabAccess['edit'] === '1') { @@ -482,17 +483,20 @@ class AdminCarriersControllerCore extends AdminController else $this->errors[] = Tools::displayError('You do not have permission to edit this.'); } +*/ else if (isset($_GET['isFree'.$this->table])) { $this->processIsFree(); } else { - if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox'))) + /* + if ((Tools::isSubmit('submitDel'.$this->table) && in_array(Configuration::get('PS_CARRIER_DEFAULT'), Tools::getValue('carrierBox'))) || (isset($_GET['delete'.$this->table]) && Tools::getValue('id_carrier') == Configuration::get('PS_CARRIER_DEFAULT'))) $this->errors[] = $this->l('Please set another carrier as default before deleting this one.'); else { +*/ // if deletion : removes the carrier from the warehouse/carrier association if (Tools::isSubmit('delete'.$this->table)) { @@ -514,7 +518,7 @@ class AdminCarriersControllerCore extends AdminController } parent::postProcess(); Carrier::cleanPositions(); - } + //} } }