ENHANCEMENT: Added better support for using DataDifferencer to look at new records.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@79404 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-06-17 03:42:24 +00:00
parent 7e3652216b
commit dfc1598de0

View File

@ -113,8 +113,8 @@ class DataDifferencer extends ViewableData {
'Diff' => $this->fromRecord 'Diff' => $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->$field, 'From' => $this->fromRecord ? $this->fromRecord->$field : null,
'To' => $this->toRecord->$field, 'To' => $this->toRecord ? $this->toRecord->$field : null,
))); )));
} }
} }