Merge branch '4' into 5

This commit is contained in:
Guy Sartorelli 2022-09-02 11:01:22 +12:00
commit d56682509c
No known key found for this signature in database
GPG Key ID: F313E3B9504D496A
2 changed files with 2 additions and 2 deletions

View File

@ -2080,7 +2080,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
} }
if ($version) { if ($version) {
$record->doRollbackTo($version); $record->rollbackRecursive($version);
$message = _t( $message = _t(
__CLASS__ . '.ROLLEDBACKVERSIONv2', __CLASS__ . '.ROLLEDBACKVERSIONv2',
"Rolled back to version #{version}.", "Rolled back to version #{version}.",

View File

@ -108,7 +108,7 @@ class CMSSiteTreeFilterTest extends SapphireTest
$changedPage->Title = 'Changed 2'; $changedPage->Title = 'Changed 2';
$changedPage->write(); $changedPage->write();
$changedPage->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE); $changedPage->copyVersionToStage(Versioned::DRAFT, Versioned::LIVE);
$changedPage->doRollbackTo($changedPageVersion); $changedPage->rollbackRecursive($changedPageVersion);
$f = new CMSSiteTreeFilter_ChangedPages(['Term' => 'Changed']); $f = new CMSSiteTreeFilter_ChangedPages(['Term' => 'Changed']);
$results = $f->pagesIncluded(); $results = $f->pagesIncluded();