mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 11:05:31 +02:00
Show initial version in allchanges feed
This commit is contained in:
parent
c03d666fe9
commit
671bf57015
@ -1,4 +1,4 @@
|
||||
<?php
|
||||
|
||||
Object::add_extension('Page', 'VersionFeed');
|
||||
Object::add_extension('ContentController', 'VersionFeed_Controller');
|
||||
SiteTree::add_extension('VersionFeed');
|
||||
ContentController::add_extension('VersionFeed_Controller');
|
||||
|
@ -63,7 +63,9 @@ class VersionFeed extends SiteTreeExtension {
|
||||
$previous = $version;
|
||||
}
|
||||
|
||||
if ($fullHistory && $previous) {
|
||||
// Push the first version on to the list - only if we're looking at the full history or if it's the first
|
||||
// version in the version history.
|
||||
if ($previous && ($fullHistory || $versions->count() == 1)) {
|
||||
$first = clone($previous);
|
||||
$first->DiffContent = new HTMLText();
|
||||
$first->DiffContent->setValue('<div>' . $first->obj('Content')->forTemplate() . '</div>');
|
||||
|
Loading…
Reference in New Issue
Block a user