mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Make DataDifferencer injectable
Requested by Steve Boyd
This commit is contained in:
parent
4731d3c671
commit
d39e9b0bb0
@ -1100,7 +1100,7 @@ class Versioned extends DataExtension implements TemplateGlobalProvider {
|
|||||||
$fromRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $from);
|
$fromRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $from);
|
||||||
$toRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $to);
|
$toRecord = Versioned::get_version($this->owner->class, $this->owner->ID, $to);
|
||||||
|
|
||||||
$diff = new DataDifferencer($fromRecord, $toRecord);
|
$diff = DataDifferencer::create($fromRecord, $toRecord);
|
||||||
|
|
||||||
return $diff->diffedData();
|
return $diff->diffedData();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user