Fixes to the logging

- in some places MISP tried to save the org ID instead of the org name in the logs

- fixed
pull/762/head
Iglocska 2015-12-03 10:20:29 +01:00
parent ab26eafd63
commit 39945ca39e
2 changed files with 5 additions and 5 deletions

View File

@ -1037,7 +1037,7 @@ class EventsController extends AppController {
if (count($existingAttribute)) {
if ($existingAttribute['Attribute']['event_id'] != $id) {
$result = $this->Log->save(array(
'org' => $this->Auth->user('org'),
'org' => $this->Auth->user('Organisation')['name'],
'model' => 'Event',
'model_id' => $id,
'email' => $this->Auth->user('email'),
@ -1070,7 +1070,7 @@ class EventsController extends AppController {
$attribute_short = (isset($this->request->data['Attribute'][$k]['category']) ? $this->request->data['Attribute'][$k]['category'] : 'N/A') . '/' . (isset($this->request->data['Attribute'][$k]['type']) ? $this->request->data['Attribute'][$k]['type'] : 'N/A') . ' ' . (isset($this->request->data['Attribute'][$k]['value']) ? $this->request->data['Attribute'][$k]['value'] : 'N/A');
$this->Log->create();
$this->Log->save(array(
'org' => $this->Auth->user('org'),
'org' => $this->Auth->user('Organisation')['name'],
'model' => 'Attribute',
'model_id' => 0,
'email' => $this->Auth->user('email'),

View File

@ -763,7 +763,7 @@ class ServersController extends AppController {
if ($beforeResult !== true) {
$this->Log->create();
$result = $this->Log->save(array(
'org_id' => $this->Auth->user('org_id'),
'org' => $this->Auth->user('Organisation')['name'],
'model' => 'Server',
'model_id' => 0,
'email' => $this->Auth->user('email'),
@ -791,7 +791,7 @@ class ServersController extends AppController {
$this->Server->serverSettingsSaveValue($setting, $this->request->data['Server']['value']);
$this->Log->create();
$result = $this->Log->save(array(
'org_id' => $this->Auth->user('org_id'),
'org' => $this->Auth->user('Organisation')['name'],
'model' => 'Server',
'model_id' => 0,
'email' => $this->Auth->user('email'),
@ -806,7 +806,7 @@ class ServersController extends AppController {
if ($afterResult !== true) {
$this->Log->create();
$result = $this->Log->save(array(
'org_id' => $this->Auth->user('org_id'),
'org' => $this->Auth->user('Organisation')['name'],
'model' => 'Server',
'model_id' => 0,
'email' => $this->Auth->user('email'),