Switched Diff to the escaped variable created

This commit is contained in:
Christopher Joe 2016-05-20 10:51:59 +12:00
parent 3a277f3a5e
commit b4ac3ba141

View File

@ -213,9 +213,7 @@ 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' => $fieldDiff,
? Diff::compareHTML($this->fromRecord->$field, $this->toRecord->$field)
: "<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,
))); )));