From d165b754569dffa9a0799bf0bfe5ffb5e805a033 Mon Sep 17 00:00:00 2001 From: sebastiaan Date: Mon, 31 Jan 2011 15:02:24 -0100 Subject: [PATCH] =?UTF-8?q?Workitem:=2029976=20-=20Additional=20fix,=20som?= =?UTF-8?q?etimes=20the=20niceUrl=20does=20NOT=20start=20with=20a=20slash,?= =?UTF-8?q?=20in=20which=20case=20you=20wouldn=C2=B4t=20want=20to=20strip?= =?UTF-8?q?=20the=20first=20character?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/umbraco/editContent.aspx.cs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/umbraco/presentation/umbraco/editContent.aspx.cs b/umbraco/presentation/umbraco/editContent.aspx.cs index 6683e62573..e963b623b4 100644 --- a/umbraco/presentation/umbraco/editContent.aspx.cs +++ b/umbraco/presentation/umbraco/editContent.aspx.cs @@ -37,7 +37,7 @@ namespace umbraco.cms.presentation controls.ContentControl cControl; DropDownList ddlDefaultTemplate = new DropDownList(); - + uicontrols.Pane publishProps = new uicontrols.Pane(); uicontrols.Pane linkProps = new uicontrols.Pane(); @@ -133,8 +133,8 @@ namespace umbraco.cms.presentation cms.businesslogic.web.DocumentType DocumentType = new cms.businesslogic.web.DocumentType(_document.ContentType.Id); cControl.PropertiesPane.addProperty(ui.Text("documentType"), new LiteralControl(DocumentType.Text)); - - + + //template picker cControl.PropertiesPane.addProperty(ui.Text("template"), template); @@ -281,7 +281,7 @@ namespace umbraco.cms.presentation } } - + // Run Handler @@ -316,7 +316,7 @@ namespace umbraco.cms.presentation if (_document.PublishWithResult(base.getUser())) { - + ClientTools.ShowSpeechBubble(speechBubbleIcon.save, ui.Text("speechBubbles", "editContentPublishedHeader", null), ui.Text("speechBubbles", "editContentPublishedText", null)); library.UpdateDocumentCache(_document.Id); @@ -383,7 +383,13 @@ namespace umbraco.cms.presentation if (library.NiceUrl(int.Parse(s)) == "") tempLink = "N/A"; else if (int.Parse(s) != _document.Id) - tempLink = "http://" + domains[i].Name + "/" + currentLink.Replace(library.NiceUrl(int.Parse(s)).Replace(".aspx", ""), "").Substring(1); + { + string niceUrl = currentLink.Replace(library.NiceUrl(int.Parse(s)).Replace(".aspx", ""), ""); + if (!niceUrl.StartsWith("/")) + niceUrl = "/" + niceUrl; + + tempLink = "http://" + domains[i].Name + niceUrl; + } else tempLink = "http://" + domains[i].Name;