From 155a98a3dcd6c66203c6caa79409e9886aafd2de Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Tue, 11 Dec 2012 08:34:50 -0100 Subject: [PATCH] Ammending commit 94f54db3ef7e, VirtualPathUtility didn't work, found that we have a lovely new Umbraco.Core.IO.IOHelper for the thing we're trying to do here --- src/Umbraco.Web/umbraco.presentation/macro.cs | 2 +- .../userControlWrapper/usercontrolDataEditor.cs | 13 ++----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/Umbraco.Web/umbraco.presentation/macro.cs b/src/Umbraco.Web/umbraco.presentation/macro.cs index 50e337cdf7..446599a88d 100644 --- a/src/Umbraco.Web/umbraco.presentation/macro.cs +++ b/src/Umbraco.Web/umbraco.presentation/macro.cs @@ -1494,7 +1494,7 @@ namespace umbraco try { - string userControlPath = VirtualPathUtility.ToAppRelative(fileName); + string userControlPath = IOHelper.FindFile(fileName); if (!File.Exists(IOHelper.MapPath(userControlPath))) return new LiteralControl(string.Format("UserControl {0} does not exist.", fileName)); diff --git a/src/umbraco.editorControls/userControlWrapper/usercontrolDataEditor.cs b/src/umbraco.editorControls/userControlWrapper/usercontrolDataEditor.cs index b51b028df3..65aef26d7a 100644 --- a/src/umbraco.editorControls/userControlWrapper/usercontrolDataEditor.cs +++ b/src/umbraco.editorControls/userControlWrapper/usercontrolDataEditor.cs @@ -1,18 +1,9 @@ using System; -using System.Data; -using System.Configuration; -using System.Web; -using System.Web.Security; using System.Web.UI; -using System.Web.UI.WebControls; -using System.Web.UI.WebControls.WebParts; -using System.Web.UI.HtmlControls; +using Umbraco.Core.IO; using umbraco.cms.businesslogic.property; -using umbraco.interfaces; -using umbraco.editorControls; using umbraco.cms.businesslogic.datatype; using System.Collections.Generic; -using umbraco.IO; namespace umbraco.editorControls.userControlGrapper { @@ -33,7 +24,7 @@ namespace umbraco.editorControls.userControlGrapper public usercontrolDataEditor(umbraco.interfaces.IData Data, string UsercontrolPath) { _data = Data; - _usercontrolPath = VirtualPathUtility.ToAppRelative(UsercontrolPath); + _usercontrolPath = IOHelper.FindFile(UsercontrolPath); } public virtual bool TreatAsRichTextEditor