Adds Script repository and some edits to the Script model U4-965

Refactoring RepositoryResolver to use the base repository instead of the Queryable repo.
This commit is contained in:
Morten@Thinkpad-X220
2012-10-09 08:12:03 -02:00
parent 93694daf28
commit 0fbf3b2fdc
4 changed files with 108 additions and 8 deletions

View File

@@ -34,15 +34,15 @@ namespace Umbraco.Core.Models
//See codeEditorSave.asmx.cs for reference.
var exts = UmbracoSettings.ScriptFileTypes.Split(',').ToList();
if (UmbracoSettings.DefaultRenderingEngine == RenderingEngine.Mvc)
/*if (UmbracoSettings.DefaultRenderingEngine == RenderingEngine.Mvc)
{
exts.Add("cshtml");
exts.Add("vbhtml");
}
}*/
var dirs = SystemDirectories.Scripts;
if (UmbracoSettings.DefaultRenderingEngine == RenderingEngine.Mvc)
dirs += "," + SystemDirectories.MvcViews;
/*if (UmbracoSettings.DefaultRenderingEngine == RenderingEngine.Mvc)
dirs += "," + SystemDirectories.MvcViews;*/
//Validate file
var validFile = IOHelper.ValidateEditPath(Path, dirs.Split(','));