// Fixed warehouses/carriers associations - #PI-134

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14678 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
bMancone
2012-04-17 12:21:22 +00:00
parent 7e3e03b869
commit d3b0c7fec1
+19 -12
View File
@@ -538,18 +538,6 @@ class AdminWarehousesControllerCore extends AdminController
}
}
// if updating
if ($obj->id > 0)
{
// handles shops associations
if (Tools::isSubmit('ids_shops'))
$obj->setShops(Tools::getValue('ids_shops'));
// handles carriers associations
if (Tools::isSubmit('ids_carriers'))
$obj->setCarriers(Tools::getValue('ids_carriers'));
}
// hack for enable the possibility to update a warehouse without recreate new id
$this->deleted = false;
@@ -588,6 +576,25 @@ class AdminWarehousesControllerCore extends AdminController
}
}
/**
* @see AdminController::processUpdate();
*/
public function processUpdate()
{
if (!($obj = $this->loadObject(true)))
return;
// handles shops associations
if (Tools::isSubmit('ids_shops'))
$obj->setShops(Tools::getValue('ids_shops'));
// handles carriers associations
$obj->setCarriers(Tools::getValue('ids_carriers'), array());
return parent::processUpdate();
}
/**
* @see AdminController::initProcess()
*/