mirror of
https://github.com/silverstripe/silverstripe-versionfeed
synced 2024-10-22 09:05:31 +00:00
Show initial version in allchanges feed
This commit is contained in:
parent
c03d666fe9
commit
671bf57015
@ -1,4 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
Object::add_extension('Page', 'VersionFeed');
|
SiteTree::add_extension('VersionFeed');
|
||||||
Object::add_extension('ContentController', 'VersionFeed_Controller');
|
ContentController::add_extension('VersionFeed_Controller');
|
||||||
|
@ -63,7 +63,9 @@ class VersionFeed extends SiteTreeExtension {
|
|||||||
$previous = $version;
|
$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 = clone($previous);
|
||||||
$first->DiffContent = new HTMLText();
|
$first->DiffContent = new HTMLText();
|
||||||
$first->DiffContent->setValue('<div>' . $first->obj('Content')->forTemplate() . '</div>');
|
$first->DiffContent->setValue('<div>' . $first->obj('Content')->forTemplate() . '</div>');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user