ENH Don't use deprecated method doRevertTo() (#2775)

This commit is contained in:
Guy Sartorelli 2022-09-02 10:56:28 +12:00 committed by GitHub
parent f51d4f0aeb
commit 2b8bee7970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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