Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2023-08-25 15:47:47 +01:00
commit 0a47706e46

View file

@ -50,13 +50,15 @@ class ActionlogsTransformer
if (($actionlog->log_meta) && ($actionlog->log_meta!='')) {
$meta_array = json_decode($actionlog->log_meta);
$clean_meta = [];
if ($meta_array) {
foreach ($meta_array as $fieldname => $fieldata) {
$clean_meta[$fieldname]['old'] = $this->clean_field($fieldata->old);
$clean_meta[$fieldname]['new'] = $this->clean_field($fieldata->new);
}
}
$clean_meta= $this->changedInfo($clean_meta);
}
@ -120,9 +122,7 @@ class ActionlogsTransformer
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
'action_date' => ($actionlog->action_date) ? Helper::getFormattedDateObject($actionlog->action_date, 'datetime'): Helper::getFormattedDateObject($actionlog->created_at, 'datetime'),
];
//\Log::info("Clean Meta is: ".print_r($clean_meta,true));
//dd($array);
return $array;
}