// stock movements : interface bug fix on product name in case of the product was deleted from the system

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10168 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
dSevere
2011-11-16 11:03:25 +00:00
parent 55d910eb08
commit 37b868fde9
@@ -383,4 +383,28 @@ class AdminStockMvtControllerCore extends AdminController
return parent::postProcess();
}
/**
* AdminController::getList() override
* @see AdminController::getList()
*/
public function getList($id_lang, $order_by = null, $order_way = null, $start = 0, $limit = null, $id_lang_shop = false)
{
parent::getList($id_lang, $order_by, $order_way, $start, $limit, $id_lang_shop);
//If there is a field product_name in the list, check if this field is null and display standard message
foreach ($this->fieldsDisplay as $key => $value)
if ($key == 'product_name')
{
$nb_items = count($this->_list);
for ($i = 0; $i < $nb_items; ++$i)
{
$item = &$this->_list[$i];
if (empty($item['product_name']))
$item['product_name'] = $this->l('The name of this product is not available. Maybe it has been deleted from the system.');
}
}
}
}