diff --git a/_config.php b/_config.php index 325e9f9..2e4f5ea 100644 --- a/_config.php +++ b/_config.php @@ -5,15 +5,14 @@ * about a number of sub-sites, rather than a single site. */ -Object::add_extension('SiteTree', 'SiteTreeSubsites'); -Object::add_extension('ContentController', 'ControllerSubsites'); -Object::add_extension('LeftAndMain', 'LeftAndMainSubsites'); -Object::add_extension('LeftAndMain', 'ControllerSubsites'); - -Object::add_extension('Group', 'GroupSubsites'); -Object::add_extension('File', 'FileSubsites'); -Object::add_extension('ErrorPage', 'ErrorPageSubsite'); -Object::add_extension('SiteConfig', 'SiteConfigSubsites'); +SiteTree::add_extension('SiteTreeSubsites'); +ContentController::add_extension('ControllerSubsites'); +LeftAndMain::add_extension('LeftAndMainSubsites'); +LeftAndMain::add_extension('ControllerSubsites'); +Group::add_extension('GroupSubsites'); +File::add_extension('FileSubsites'); +ErrorPage::add_extension('ErrorPageSubsite'); +SiteConfig::add_extension('SiteConfigSubsites'); SS_Report::add_excluded_reports('SubsiteReportWrapper'); diff --git a/code/extensions/ErrorPageSubsite.php b/code/extensions/ErrorPageSubsite.php index 2cd468d..0e620ca 100644 --- a/code/extensions/ErrorPageSubsite.php +++ b/code/extensions/ErrorPageSubsite.php @@ -10,7 +10,7 @@ class ErrorPageSubsite extends DataExtension { * opening ErrorPage in the CMS and publish ErrorPage causes static error page to get generated incorrectly. */ function alternateFilepathForErrorcode($statusCode, $locale = null) { - $static_filepath = Object::get_static($this->owner->ClassName, 'static_filepath'); + $static_filepath = Config::inst()->get($this->owner->ClassName, 'static_filepath'); $subdomainPart = ""; // Try to get current subsite from session