mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-11 16:14:18 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
0a47706e46
|
@ -50,13 +50,15 @@ class ActionlogsTransformer
|
||||||
if (($actionlog->log_meta) && ($actionlog->log_meta!='')) {
|
if (($actionlog->log_meta) && ($actionlog->log_meta!='')) {
|
||||||
$meta_array = json_decode($actionlog->log_meta);
|
$meta_array = json_decode($actionlog->log_meta);
|
||||||
|
|
||||||
|
$clean_meta = [];
|
||||||
|
|
||||||
if ($meta_array) {
|
if ($meta_array) {
|
||||||
foreach ($meta_array as $fieldname => $fieldata) {
|
foreach ($meta_array as $fieldname => $fieldata) {
|
||||||
$clean_meta[$fieldname]['old'] = $this->clean_field($fieldata->old);
|
$clean_meta[$fieldname]['old'] = $this->clean_field($fieldata->old);
|
||||||
$clean_meta[$fieldname]['new'] = $this->clean_field($fieldata->new);
|
$clean_meta[$fieldname]['new'] = $this->clean_field($fieldata->new);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$clean_meta= $this->changedInfo($clean_meta);
|
$clean_meta= $this->changedInfo($clean_meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,9 +122,7 @@ class ActionlogsTransformer
|
||||||
'log_meta' => ((isset($clean_meta)) && (is_array($clean_meta))) ? $clean_meta: null,
|
'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'),
|
'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;
|
return $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue