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
This commit is contained in:
Sebastiaan Janssen
2012-12-11 08:34:50 -01:00
parent 15c78b539d
commit 155a98a3dc
2 changed files with 3 additions and 12 deletions

View File

@@ -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));

View File

@@ -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