[+] BO: Addition, deletion and edition are now logged

This commit is contained in:
Rémi Gaillard
2013-07-11 14:50:23 +02:00
parent d772d97bfa
commit 004e833b24
6 changed files with 27 additions and 5 deletions
@@ -1714,6 +1714,7 @@ class AdminProductsControllerCore extends AdminController
if ($this->object->add())
{
Logger::addLog(sprintf($this->l('%s addition'), $this->className), 1, null, $this->className, (int)$this->object->id, true, (int)$this->context->employee->id);
$this->addCarriers();
$this->updateAccessories($this->object);
$this->updatePackItems($this->object);
@@ -1855,6 +1856,7 @@ class AdminProductsControllerCore extends AdminController
if ($object->update())
{
Logger::addLog(sprintf($this->l('%s edition'), $this->className), 1, null, $this->className, (int)$this->object->id, true, (int)$this->context->employee->id);
if (in_array($this->context->shop->getContext(), array(Shop::CONTEXT_SHOP, Shop::CONTEXT_ALL)))
{
if ($this->isTabSubmitted('Shipping'))