mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
ENH Don't use deprecated method doRevertTo() (#2775)
This commit is contained in:
parent
f51d4f0aeb
commit
2b8bee7970
@ -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}.",
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user