diff --git a/core/control/ContentController.php b/core/control/ContentController.php
index f32afe0f3..a4f866bfb 100755
--- a/core/control/ContentController.php
+++ b/core/control/ContentController.php
@@ -118,7 +118,7 @@ class ContentController extends Controller {
Session::clear('currentStage');
Session::clear('archiveDate');
- return Security::permissionFailure($this, sprintf($message, "$link?stage=Live"));
+ return Security::permissionFailure($this, sprintf($message, Controller::join_links($link, "?stage=Live")));
}
}
diff --git a/core/control/SilverStripeNavigatorItem.php b/core/control/SilverStripeNavigatorItem.php
index 2ef73a15f..2e080be75 100644
--- a/core/control/SilverStripeNavigatorItem.php
+++ b/core/control/SilverStripeNavigatorItem.php
@@ -96,8 +96,8 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
} else {
$draftPage = Versioned::get_one_by_stage('SiteTree', 'Stage', '"SiteTree"."ID" = ' . $page->ID);
if($draftPage) {
- $pageLink = $draftPage->AbsoluteLink();
- return "". _t('ContentController.DRAFTSITE', 'Draft Site') ."";
+ $pageLink = Controller::join_links($draftPage->AbsoluteLink(), "?stage=Stage");
+ return "". _t('ContentController.DRAFTSITE', 'Draft Site') ."";
}
}
}
@@ -110,7 +110,7 @@ class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem {
function getLink($page) {
if(Versioned::current_stage() == 'Stage') {
- return $page->AbsoluteLink() . '?stage=Stage';
+ return Controller::join_links($page->AbsoluteLink(), '?stage=Stage');
}
}
}
@@ -128,8 +128,8 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
} else {
$livePage = Versioned::get_one_by_stage('SiteTree', 'Live', '"SiteTree"."ID" = ' . $page->ID);
if($livePage) {
- $pageLink = $livePage->AbsoluteLink();
- return "". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."";
+ $pageLink = Controller::join_links($livePage->AbsoluteLink(), "?stage=Live");
+ return "". _t('ContentController.PUBLISHEDSITE', 'Published Site') ."";
}
}
}
@@ -142,7 +142,7 @@ class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem {
function getLink($page) {
if(Versioned::current_stage() == 'Live') {
- return $page->AbsoluteLink() . '?stage=Live';
+ return Controller::join_links($page->AbsoluteLink(), '?stage=Live');
}
}
}