mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 22:58:24 +02:00
FEATURE: Use tidied HTML in DataDifferencer (from r97018)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102420 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5e4210755b
commit
8a8501c854
@ -111,9 +111,11 @@ class DataDifferencer extends ViewableData {
|
|||||||
$changedFields->push(new ArrayData(array(
|
$changedFields->push(new ArrayData(array(
|
||||||
'Name' => $field,
|
'Name' => $field,
|
||||||
'Title' => $base->fieldLabel($field),
|
'Title' => $base->fieldLabel($field),
|
||||||
'Diff' => $this->fromRecord
|
'Diff' => new SS_HTMLValue(
|
||||||
|
$this->fromRecord
|
||||||
? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field)
|
? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field)
|
||||||
: "<ins>" . $this->toRecord->$field . "</ins>",
|
: "<ins>" . $this->toRecord->$field . "</ins>"
|
||||||
|
),
|
||||||
'From' => $this->fromRecord ? $this->fromRecord->$field : null,
|
'From' => $this->fromRecord ? $this->fromRecord->$field : null,
|
||||||
'To' => $this->toRecord ? $this->toRecord->$field : null,
|
'To' => $this->toRecord ? $this->toRecord->$field : null,
|
||||||
)));
|
)));
|
||||||
|
Loading…
Reference in New Issue
Block a user