Adds IO Helper overload for the views and masterpages

Adds UmbracoSettings to toggle mvc templating support
This commit is contained in:
PerPloug
2012-09-27 06:21:59 -02:00
parent f7f83bc057
commit 7e5db90b3b
2 changed files with 19 additions and 1 deletions

View File

@@ -77,7 +77,12 @@ namespace umbraco.IO
return Umbraco.Core.IO.IOHelper.ValidateEditPath(filePath, validDir);
}
public static bool ValidateFileExtension(string filePath, List<string> validFileExtensions)
public static bool ValidateEditPath(string filePath, string[] validDirs)
{
return Umbraco.Core.IO.IOHelper.ValidateEditPath(filePath, validDirs);
}
public static bool ValidateFileExtension(string filePath, List<string> validFileExtensions)
{
return Umbraco.Core.IO.IOHelper.ValidateFileExtension(filePath, validFileExtensions);
}

View File

@@ -546,6 +546,19 @@ namespace umbraco
get { return Umbraco.Core.Configuration.UmbracoSettings.ResolveUrlsFromTextString; }
}
/// <summary>
/// Enables MVC, and at the same time disable webform masterpage templates.
/// This ensure views are automaticly created instead of masterpages.
/// Views are display in the tree instead of masterpages and a MVC template editor
/// is used instead of the masterpages editor
/// </summary>
/// <value><c>true</c> if umbraco defaults to using MVC views for templating, otherwise <c>false</c>.</value>
public static bool EnableMvcSupport
{
get { return Umbraco.Core.Configuration.UmbracoSettings.EnableMvcSupport; }
}
/// <summary>
/// Configuration regarding webservices
/// </summary>