[+] BO: Addition, deletion and edition are now logged
This commit is contained in:
@@ -38,6 +38,7 @@ class AdminLogsControllerCore extends AdminController
|
||||
|
||||
$this->fields_list = array(
|
||||
'id_log' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25),
|
||||
'employee' => array('title' => $this->l('Employee'), 'align' => 'center', 'width' => 100),
|
||||
'severity' => array('title' => $this->l('Severity (1-4)'), 'align' => 'center', 'width' => 50),
|
||||
'message' => array('title' => $this->l('Message')),
|
||||
'object_type' => array('title' => $this->l('Object type'), 'width' => 75),
|
||||
@@ -62,6 +63,8 @@ class AdminLogsControllerCore extends AdminController
|
||||
)
|
||||
);
|
||||
$this->list_no_link = true;
|
||||
$this->_select .= 'CONCAT(LEFT(e.firstname, 1), \'. \', e.lastname) employee';
|
||||
$this->_join .= ' LEFT JOIN '._DB_PREFIX_.'employee e ON (a.id_employee = e.id_employee)';
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
|
||||
@@ -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'))
|
||||
|
||||
Reference in New Issue
Block a user