Merge pull request #155 from shoaibali/master

Removed hard coding of HTTP protocol
This commit is contained in:
Sean Harvey 2014-08-19 09:16:48 +12:00
commit e5ea8ebc35
1 changed files with 1 additions and 1 deletions

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)