mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 09:05:55 +00:00
Removed hard coding of HTTP protocol
This commit is contained in:
parent
a3b2be734f
commit
1f2cb4380d
@ -93,7 +93,7 @@ class SiteTreeSubsites extends DataExtension {
|
|||||||
$subsite = $this->owner->Subsite();
|
$subsite = $this->owner->Subsite();
|
||||||
$nested_urls_enabled = Config::inst()->get('SiteTree', 'nested_urls');
|
$nested_urls_enabled = Config::inst()->get('SiteTree', 'nested_urls');
|
||||||
if($subsite && $subsite->ID) {
|
if($subsite && $subsite->ID) {
|
||||||
$baseUrl = 'http://' . $subsite->domain() . '/';
|
$baseUrl = Director::protocol() . $subsite->domain() . '/';
|
||||||
$baseLink = Controller::join_links (
|
$baseLink = Controller::join_links (
|
||||||
$baseUrl,
|
$baseUrl,
|
||||||
($nested_urls_enabled && $this->owner->ParentID ? $this->owner->Parent()->RelativeLink(true) : null)
|
($nested_urls_enabled && $this->owner->ParentID ? $this->owner->Parent()->RelativeLink(true) : null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user