Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
This commit is contained in:
@@ -181,11 +181,13 @@ class AdminStockInstantStateControllerCore extends AdminController
|
||||
*/
|
||||
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
|
||||
{
|
||||
if (Tools::isSubmit('csv') && (int)Tools::getValue('id_warehouse') != -1)
|
||||
if ((Tools::isSubmit('csv_quantities') || Tools::isSubmit('csv_prices')) &&
|
||||
(int)Tools::getValue('id_warehouse') != -1)
|
||||
$limit = false;
|
||||
|
||||
$order_by_valuation = false;
|
||||
$order_by_real_quantity = false;
|
||||
|
||||
if ($this->context->cookie->{$this->table.'Orderby'} == 'valuation')
|
||||
{
|
||||
unset($this->context->cookie->{$this->table.'Orderby'});
|
||||
@@ -200,6 +202,7 @@ class AdminStockInstantStateControllerCore extends AdminController
|
||||
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
|
||||
|
||||
$nb_items = count($this->_list);
|
||||
|
||||
for ($i = 0; $i < $nb_items; ++$i)
|
||||
{
|
||||
$item = &$this->_list[$i];
|
||||
|
||||
@@ -77,8 +77,23 @@ class AdminTagsControllerCore extends AdminController
|
||||
public function postProcess()
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1' && Tools::getValue('submitAdd'.$this->table))
|
||||
{
|
||||
if (($id = (int)Tools::getValue($this->identifier)) && ($obj = new $this->className($id)) && Validate::isLoadedObject($obj))
|
||||
{
|
||||
$previousProducts = $obj->getProducts();
|
||||
$removedProducts = array();
|
||||
|
||||
foreach ($previousProducts as $product)
|
||||
if (!in_array($product['id_product'], $_POST['products']))
|
||||
$removedProducts[] = $product['id_product'];
|
||||
|
||||
if (Configuration::get('PS_SEARCH_INDEXATION'))
|
||||
Search::removeProductsSearchIndex($removedProducts);
|
||||
|
||||
$obj->setProducts($_POST['products']);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::postProcess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user