Removed hard coding of HTTP protocol

This commit is contained in:
Shoaib Ali 2014-08-18 21:03:52 +12:00
parent a3b2be734f
commit 1f2cb4380d

View File

@ -93,7 +93,7 @@ class SiteTreeSubsites extends DataExtension {
$subsite = $this->owner->Subsite();
$nested_urls_enabled = Config::inst()->get('SiteTree', 'nested_urls');
if($subsite && $subsite->ID) {
$baseUrl = 'http://' . $subsite->domain() . '/';
$baseUrl = Director::protocol() . $subsite->domain() . '/';
$baseLink = Controller::join_links (
$baseUrl,
($nested_urls_enabled && $this->owner->ParentID ? $this->owner->Parent()->RelativeLink(true) : null)