From 3aa65ead7f93f21506ba680295b5830ba528cba4 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:45:15 +1300 Subject: [PATCH] ENH Update code to reflect changes in silverstripe/admin (#267) --- src/Extensions/ContentReviewCMSExtension.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Extensions/ContentReviewCMSExtension.php b/src/Extensions/ContentReviewCMSExtension.php index 8d263fe..997f3c3 100644 --- a/src/Extensions/ContentReviewCMSExtension.php +++ b/src/Extensions/ContentReviewCMSExtension.php @@ -2,6 +2,7 @@ namespace SilverStripe\ContentReview\Extensions; +use SilverStripe\Admin\FormSchemaController; use SilverStripe\Admin\LeftAndMain; use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\CMS\Model\SiteTree; @@ -136,7 +137,7 @@ protected function findRecord($data) */ protected function getSchemaRequested() { - $parts = $this->owner->getRequest()->getHeader(LeftAndMain::SCHEMA_HEADER); + $parts = $this->owner->getRequest()->getHeader(FormSchemaController::SCHEMA_HEADER); return !empty($parts); } @@ -151,7 +152,7 @@ protected function getSchemaRequested() */ protected function getSchemaResponse($schemaID, $form = null, ValidationResult $errors = null, $extraData = []) { - $parts = $this->owner->getRequest()->getHeader(LeftAndMain::SCHEMA_HEADER); + $parts = $this->owner->getRequest()->getHeader(FormSchemaController::SCHEMA_HEADER); $data = $this->owner ->getFormSchema() ->getMultipartSchema($parts, $schemaID, $form, $errors);