Skip to content

Commit

Permalink
API Stop using deprecated LeftAndMain::SCHEMA_HEADER const (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Feb 26, 2025
1 parent ce8adf2 commit ccd0cb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Extensions/ContentReviewCMSExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Forms\Form;
use SilverStripe\Forms\Schema\FormSchema;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Security\Security;

Expand Down Expand Up @@ -136,7 +137,7 @@ protected function findRecord($data)
*/
protected function getSchemaRequested()
{
$parts = $this->owner->getRequest()->getHeader(LeftAndMain::SCHEMA_HEADER);
$parts = $this->owner->getRequest()->getHeader(FormSchema::SCHEMA_HEADER);
return !empty($parts);
}

Expand All @@ -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(FormSchema::SCHEMA_HEADER);
$data = $this->owner
->getFormSchema()
->getMultipartSchema($parts, $schemaID, $form, $errors);
Expand Down

0 comments on commit ccd0cb8

Please sign in to comment.