Skip to content

Commit

Permalink
Add Site class reference
Browse files Browse the repository at this point in the history
String 'Site' will not work with the current setup in SS4 anymore, so this check always fails, resulting in the preview not being hidden as intended.
  • Loading branch information
NikxDa authored Oct 12, 2020
1 parent 984fae8 commit dbd5797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Admin/MultisitesCmsMainExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function updateEditForm($form) {
$classNameField = $form->Fields()->dataFieldByName('ClassName');
if ($classNameField) {
$className = $classNameField->Value();
if ($className === 'Site')
if ($className === Site::class)
{
$form->Fields()->removeByName(array(SilverStripeNavigator::class));
$form->removeExtraClass('cms-previewable');
Expand Down

0 comments on commit dbd5797

Please sign in to comment.