Merge remote-tracking branch 'origin/6.2.0' into 7.0.0

Conflicts:
	src/Umbraco.Core/ObjectResolution/Resolution.cs
This commit is contained in:
Stephan
2013-10-02 17:40:03 +02:00
5 changed files with 53 additions and 16 deletions

View File

@@ -846,8 +846,21 @@ namespace Umbraco.Core
/// does initialise the resolver.</remarks>
private static IShortStringHelper ShortStringHelper
{
get { return ShortStringHelperResolver.HasCurrent ? ShortStringHelperResolver.Current.Helper : new LegacyShortStringHelper(); }
get
{
if (ShortStringHelperResolver.HasCurrent)
return ShortStringHelperResolver.Current.Helper;
if (_helper != null)
return _helper;
// there *has* to be a short string helper, even if the resolver has not
// been initialized - used the default one with default configuration.
_helper = new DefaultShortStringHelper().WithConfig(allowLeadingDigits: true);
_helper.Freeze();
return _helper;
}
}
private static IShortStringHelper _helper;
/// <summary>
/// Returns a new string in which all occurences of specified strings are replaced by other specified strings.