Skip to content

Commit

Permalink
Merge pull request silverstripe#72 from robert-h-curry/3.1-compatibility
Browse files Browse the repository at this point in the history
Extension and config fixes for 3.1
  • Loading branch information
halkyon committed Apr 4, 2013
2 parents 01176ec + 90c1611 commit 355bb8c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions _config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
2 changes: 1 addition & 1 deletion code/extensions/ErrorPageSubsite.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 355bb8c

Please sign in to comment.