Skip to content

Commit

Permalink
Merge pull request silverstripe#155 from shoaibali/master
Browse files Browse the repository at this point in the history
Removed hard coding of HTTP protocol
  • Loading branch information
halkyon committed Aug 18, 2014
2 parents a3b2be7 + 1f2cb43 commit e5ea8eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/extensions/SiteTreeSubsites.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function updateCMSFields(FieldList $fields) {
$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)
Expand Down

0 comments on commit e5ea8eb

Please sign in to comment.