mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Merge pull request #88 from adrexia/siteconfig
BUG: Subsite save SiteConfig overwrites MainSite SiteConfig (Issue #15)
This commit is contained in:
commit
beb913d8d0
@ -3,7 +3,7 @@
|
||||
/**
|
||||
* Extension for the SiteConfig object to add subsites support
|
||||
*/
|
||||
class SiteConfigSubsites extends DataExtension {
|
||||
class SiteConfigSubsites extends DataExtension {
|
||||
|
||||
private static $has_one = array(
|
||||
'Subsite' => 'Subsite', // The subsite that this page belongs to
|
||||
@ -38,4 +38,8 @@ class SiteConfigSubsites extends DataExtension {
|
||||
function cacheKeyComponent() {
|
||||
return 'subsite-'.Subsite::currentSubsiteID();
|
||||
}
|
||||
|
||||
function updateCMSFields(FieldList $fields) {
|
||||
$fields->push(new HiddenField('SubsiteID','SubsiteID', Subsite::currentSubsiteID()));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user