Fixes U4-419 Improved editing xslt/razor/ruby/python files in subfolders a little bit (it now actually works)
Still needs more work to make it safer (especially entering backslashes will give YSODs and sometimes when you move to a different folder the old file stays behind)
This commit is contained in:
@@ -79,9 +79,7 @@ namespace umbraco.cms.presentation.developer
|
||||
// validate extension
|
||||
IOHelper.ValidateFileExtension(file, validScriptingExtensions());
|
||||
|
||||
//// we need to move the full path and then the preceeding slash
|
||||
// The textbox only needs to show the requested file (and parentfolders)
|
||||
pythonFileName.Text = Request.QueryString["file"];
|
||||
pythonFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.MacroScripts), "").Substring(1).Replace(@"\", "/");
|
||||
|
||||
StreamReader SR;
|
||||
string S;
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace umbraco.cms.presentation.developer
|
||||
IOHelper.ValidateFileExtension(file, new List<string>() { "xslt", "xsl" });
|
||||
|
||||
|
||||
xsltFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.Xslt), "").Substring(1);
|
||||
xsltFileName.Text = file.Replace(IOHelper.MapPath(SystemDirectories.Xslt), "").Substring(1).Replace(@"\", "/");
|
||||
|
||||
StreamReader SR;
|
||||
string S;
|
||||
|
||||
Reference in New Issue
Block a user