chg: [log] Convert shadowAtribute's fs/ls into understood format

pull/6327/head
mokaddem 2020-09-18 16:51:53 +02:00
parent e0bf738b11
commit f56cab6e49
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 4 additions and 0 deletions

View File

@ -947,6 +947,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 {
@ -1052,6 +1053,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');
}