Extension and config fixes for 3.1

This commit is contained in:
Robert Curry 2013-03-27 15:18:52 +13:00
parent 01176ec6ed
commit 90c16117f3
2 changed files with 9 additions and 10 deletions

View File

@ -5,15 +5,14 @@
* about a number of sub-sites, rather than a single site. * about a number of sub-sites, rather than a single site.
*/ */
Object::add_extension('SiteTree', 'SiteTreeSubsites'); SiteTree::add_extension('SiteTreeSubsites');
Object::add_extension('ContentController', 'ControllerSubsites'); ContentController::add_extension('ControllerSubsites');
Object::add_extension('LeftAndMain', 'LeftAndMainSubsites'); LeftAndMain::add_extension('LeftAndMainSubsites');
Object::add_extension('LeftAndMain', 'ControllerSubsites'); LeftAndMain::add_extension('ControllerSubsites');
Object::add_extension('Group', 'GroupSubsites');
Object::add_extension('File', 'FileSubsites');
Object::add_extension('ErrorPage', 'ErrorPageSubsite');
Object::add_extension('SiteConfig', 'SiteConfigSubsites');
Group::add_extension('GroupSubsites');
File::add_extension('FileSubsites');
ErrorPage::add_extension('ErrorPageSubsite');
SiteConfig::add_extension('SiteConfigSubsites');
SS_Report::add_excluded_reports('SubsiteReportWrapper'); SS_Report::add_excluded_reports('SubsiteReportWrapper');

View File

@ -10,7 +10,7 @@ class ErrorPageSubsite extends DataExtension {
* opening ErrorPage in the CMS and publish ErrorPage causes static error page to get generated incorrectly. * opening ErrorPage in the CMS and publish ErrorPage causes static error page to get generated incorrectly.
*/ */
function alternateFilepathForErrorcode($statusCode, $locale = null) { 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 = ""; $subdomainPart = "";
// Try to get current subsite from session // Try to get current subsite from session