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:
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user