// Deleted carriers are now properly removed from the table warehouse_carrier

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10107 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2011-11-14 15:44:26 +00:00
parent 04e40cbb73
commit 726a53c490
2 changed files with 26 additions and 2 deletions
@@ -491,13 +491,21 @@ class AdminCarriersControllerCore extends AdminController
|| (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');
else
{
// if deletion : removes the carrier from the warehouse/carrier association
if (Tools::isSubmit('delete'.$this->table))
{
$id = (int)Tools::getValue('id_'.$this->table);
Warehouse::removeCarrier($id);
}
parent::postProcess();
}
}
}
/**
* Overload the property $fields_value
*
*
* @param object $obj
*/
public function getFieldsValues($obj)