Merge branch 'event_recovery' of github.com:MISP/MISP into event_recovery

pull/6327/head
iglocska 2020-09-19 18:37:35 +02:00
commit b5ee50d251
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 4 additions and 0 deletions

View File

@ -952,6 +952,7 @@ class Log extends AppModel
if (!empty($logEntry['data']['value2'])) {
$logEntry['data']['value'] .= '|' . $logEntry['data']['value2'];
}
$logEntry['data'] = $this->Attribute->UTCToISODatetime(['ShadowAttribute' => $logEntry['data']], 'ShadowAttribute');
if (!empty($this->mockRecovery)) {
$this->mockLog[] = ['model' => 'ShadowAttribute', 'action' => 'add', 'data' => $logEntry['data']];
} else {
@ -1057,6 +1058,9 @@ class Log extends AppModel
private function __executeRecoveryMispObject($logEntry)
{
if (empty($this->Attribute)) {
$this->Attribute = ClassRegistry::init('Attribute');
}
if (empty($this->MispObject)) {
$this->MispObject = ClassRegistry::init('MispObject');
}