Merge with 4.11.5

This commit is contained in:
Shannon Deminick
2013-02-27 22:38:46 +06:00
2 changed files with 15 additions and 4 deletions

View File

@@ -37,6 +37,14 @@ namespace Umbraco.Core.Configuration
#endregion
/// <summary>
/// used for unit tests
/// </summary>
internal static void ResetCache()
{
_reservedUrlsCache = null;
}
/// <summary>
/// Gets the reserved urls from web.config.
/// </summary>
/// <value>The reserved urls.</value>
@@ -67,7 +75,8 @@ namespace Umbraco.Core.Configuration
var staticReservedPaths = "~/app_plugins/,~/install/,";
//always add the umbraco path to the list
if (ConfigurationManager.AppSettings.ContainsKey("umbracoPath"))
if (ConfigurationManager.AppSettings.ContainsKey("umbracoPath")
&& !ConfigurationManager.AppSettings["umbracoPath"].IsNullOrWhiteSpace())
{
staticReservedPaths += ConfigurationManager.AppSettings["umbracoPath"].EnsureEndsWith(',');
}

View File

@@ -24,10 +24,12 @@ namespace Umbraco.Tests
public override void TearDown()
{
//reset the app config
ConfigurationManager.AppSettings.Set("umbracoReservedPaths", "");
ConfigurationManager.AppSettings.Set("umbracoReservedUrls", "");
Umbraco.Core.Configuration.GlobalSettings.ResetCache();
base.TearDown();
//reset the app config
ConfigurationManager.AppSettings.Set("umbracoReservedPaths", "");
ConfigurationManager.AppSettings.Set("umbracoReservedUrls", "");
}
[Ignore]