From bc143c8c1ef8fd87578398a536101964585743e6 Mon Sep 17 00:00:00 2001 From: Andrew Short Date: Sun, 11 Oct 2009 00:07:12 +0000 Subject: [PATCH] MINOR: Updated SiteTree->generateURLSegment() to trim the link of dashes before returning. From: Andrew Short git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@88490 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index cb2d2a21a..682bdbe90 100755 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1361,7 +1361,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid if(!$t || $t == '-' || $t == '-1') { $t = "page-$this->ID"; } - return $t; + return trim($t, '-'); } /**