Skip to content

Commit

Permalink
[FIX] Resolving a few SS4 things that were missed during the upgrade.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed May 16, 2018
1 parent 5c8e532 commit e8eb7a9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
mappings:
MultisitesCMSMainExtension: 'Symbiote\Multisites\Admin\MultisitesCMSMainExtension'
MultisitesCMSPageAddController: 'Symbiote\Multisites\Admin\MultisitesCMSPageAddController'
MultisitesModelAdminExtension: 'Symbiote\Multisites\Admin\MultisitesModelAdminExtension'
MultisitesFrontController: 'Symbiote\Multisites\Control\MultisitesFrontController'
MultisitesRootController: 'Symbiote\Multisites\Control\MultisitesRootController'
RobotsTxtController: 'Symbiote\Multisites\Control\RobotsTxtController'
MultisitesAware: 'Symbiote\Multisites\Extension\MultisitesAware'
MultisitesContentControllerExtension: 'Symbiote\Multisites\Extension\MultisitesContentControllerExtension'
MultisitesControllerExtension: 'Symbiote\Multisites\Extension\MultisitesControllerExtension'
MultisitesErrorPageExtension: 'Symbiote\Multisites\Extension\MultisitesErrorPageExtension'
MultisitesFileFieldExtension: 'Symbiote\Multisites\Extension\MultisitesFileFieldExtension'
MultisitesHtmlEditorField_ToolbarExtension: 'Symbiote\Multisites\Extension\MultisitesHtmlEditorField_ToolbarExtension'
MultisitesMemberExtension: 'Symbiote\Multisites\Extension\MultisitesMemberExtension'
MultisitesReport: 'Symbiote\Multisites\Extension\MultisitesReport'
MultisitesSecurityExtension: 'Symbiote\Multisites\Extension\MultisitesSecurityExtension'
MultisitesSiteConfigExtension: 'Symbiote\Multisites\Extension\MultisitesSiteConfigExtension'
MultisitesSiteTreeExtension: 'Symbiote\Multisites\Extension\MultisitesSiteTreeExtension'
SiteSearchForm: 'Symbiote\Multisites\Form\SiteSearchForm'
MultisitesInitAssetsTask: 'Symbiote\Multisites\Job\MultisitesInitAssetsTask'
TidySiteTask: 'Symbiote\Multisites\Job\TidySiteTask'
Site: 'Symbiote\Multisites\Model\Site'
Multisites: 'Symbiote\Multisites\Multisites'
MultisiteSiteTest: 'Symbiote\Multisites\Tests\MultisiteSiteTest'
6 changes: 6 additions & 0 deletions _config/upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
name: multisites-upgrade
---
SilverStripe\ORM\DatabaseAdmin:
classname_value_remapping:
Site: 'Symbiote\Multisites\Model\Site'
2 changes: 1 addition & 1 deletion src/Extension/MultisitesControllerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public function onBeforeHTTPError($code, $request)
if ($errorPage) {
Requirements::clear();
Requirements::clear_combined_files();
$response = ModelAsController::controller_for($errorPage)->handleRequest($request, DataModel::inst());
$response = ModelAsController::controller_for($errorPage)->handleRequest($request);
throw new HTTPResponse_Exception($response, $code);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Model/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public function onBeforeWrite() {

$this->Host = $normalise($this->Host);

if($aliases = $this->HostAliases->getValue()) {
if(!is_array($this->HostAliases) && ($aliases = $this->HostAliases->getValue())) {
$this->HostAliases = array_map($normalise, $aliases);
}

Expand Down

0 comments on commit e8eb7a9

Please sign in to comment.