From 7e447342234bf8976834e04812e0d60819a64414 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Thu, 17 Oct 2024 13:22:12 +1300 Subject: [PATCH] API Update code to reflect changes to LeftAndMain --- src/Controllers/CMSPageHistoryViewerController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controllers/CMSPageHistoryViewerController.php b/src/Controllers/CMSPageHistoryViewerController.php index 3fa3f0f..de0166d 100644 --- a/src/Controllers/CMSPageHistoryViewerController.php +++ b/src/Controllers/CMSPageHistoryViewerController.php @@ -4,6 +4,7 @@ use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\Forms\FieldList; +use SilverStripe\Forms\Form; use SilverStripe\Forms\HiddenField; use SilverStripe\VersionedAdmin\Forms\HistoryViewerField; @@ -27,9 +28,9 @@ class CMSPageHistoryViewerController extends CMSMain private static $required_permission_codes = 'CMS_ACCESS_CMSMain'; - public function getEditForm($id = null, $fields = null) + public function getEditForm($id = null, $fields = null): Form { - $record = $this->getRecord($id ?: $this->currentPageID()); + $record = $this->getRecord($id ?: $this->currentRecordID()); $form = parent::getEditForm($id); $form->addExtraClass('history-viewer__form');