mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
5987f151d4
BUGFIX Added Subsite::allowed_domains() which selects base_domain() if no custom domains are specified. This avoids having an empty dropdown in the URL domain selection dropdown in SubsitesAdmin
20 lines
355 B
PHP
20 lines
355 B
PHP
<?php
|
|
/**
|
|
* @package subsites
|
|
*/
|
|
class ControllerSubsites extends Extension {
|
|
function controllerAugmentInit(){
|
|
if($subsite = Subsite::currentSubsite()){
|
|
if($theme = $subsite->Theme)
|
|
SSViewer::set_theme($theme);
|
|
}
|
|
}
|
|
|
|
function CurrentSubsite(){
|
|
if($subsite = Subsite::currentSubsite()){
|
|
return $subsite;
|
|
}
|
|
}
|
|
}
|
|
|
|
?>
|