Skip to content

Commit

Permalink
ENH Stop using deprecated Versioned methods (#121)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Aug 30, 2022
1 parent 2721b8f commit cd4c310
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions code/TestPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function requireDefaultRecords()
$parent = static::getOrCreateParentPage();
$page->ParentID = $parent->ID;
$page->write();
$page->publish('Stage', 'Live');
$page->copyVersionToStage('Stage', 'Live');
});
}
}
Expand All @@ -72,7 +72,7 @@ public static function getOrCreateParentPage()
)
);
$parent->write();
$parent->doPublish();
$parent->publishRecursive();
}
});

Expand Down
2 changes: 1 addition & 1 deletion code/TestRegistryPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function requireDefaultRecords()
$page->ParentID = $parent->ID;
$page->DataClass = TestRegistryDataObject::class;
$page->write();
$page->publish('Stage', 'Live');
$page->copyVersionToStage('Stage', 'Live');
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion code/tasks/FTPageMakerTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected function generatePages($depth = 0, $prefix = "", $parentID = 0, $withB
$page->ParentID = $parentID;
$page->Title = "Test page {$fullPrefix}";
$page->write();
$page->publish('Stage', 'Live');
$page->copyVersionToStage('Stage', 'Live');

echo "Created '$page->Title' ($page->ClassName)\n";

Expand Down

0 comments on commit cd4c310

Please sign in to comment.