Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silverstripe 5 support #57

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
},
"require": {
"php": ">=5.6",
"silverstripe/cms": "^4.0",
"silverstripe/framework": "^4.0"
"silverstripe/cms": "^4.0 || ^5.0",
"silverstripe/framework": "^4.0 || ^5.0"
},
"autoload": {
"psr-4": {
Expand Down
10 changes: 5 additions & 5 deletions src/Model/Extension/SeoPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ class SeoPageExtension extends DataExtension
'HeadTags' => SeoHeadTag::class,
'SitemapImages' => Image::class
];

private static $owns = [
'SocialImage'
];


/**
* Sitemap defaults
Expand Down Expand Up @@ -267,10 +267,10 @@ public function updateCMSFields(FieldList $fields)
public function updateSummaryFields(&$fields)
{
if(Controller::curr() instanceof SEOAdmin) {
if($this->owner->class && method_exists($this->owner->class, 'remove')) Config::inst()->remove($this->owner->class, 'summary_fields');
Config::modify()->set($this->owner->class, 'summary_fields', $this->getSummaryFields());
if($this->owner->ClassName && method_exists($this->owner->ClassName, 'remove')) Config::inst()->remove($this->owner->ClassName, 'summary_fields');
Config::modify()->set($this->owner->ClassName, 'summary_fields', $this->getSummaryFields());

$fields = Config::inst()->get($this->owner->class, 'summary_fields');
$fields = Config::inst()->get($this->owner->ClassName, 'summary_fields');
}
}

Expand Down