From 26f987e67f3577f9fadcf8c3599695cb35daba9a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 4 Oct 2010 06:16:23 +0000 Subject: [PATCH] BUGFIX Fixed redirection in PageCommentInterface to use Link() instead of URLSegment (fixes 4200, thanks ktauber) (from r103518) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111666 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/sitefeatures/PageCommentInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/sitefeatures/PageCommentInterface.php b/code/sitefeatures/PageCommentInterface.php index 0f278d9f..1a06018b 100755 --- a/code/sitefeatures/PageCommentInterface.php +++ b/code/sitefeatures/PageCommentInterface.php @@ -343,7 +343,7 @@ class PageCommentInterface_Form extends Form { $page = DataObject::get_by_id("Page", $comment->ParentID); if($page) { // Redirect to the actual post on the page. - return Director::redirect(Director::baseURL(). $page->URLSegment.'#PageComment_'.$comment->ID); + return Director::redirect($page->Link() . '#PageComment_' . $comment->ID); } }