Ensures that domains assigned to non-published nodes are filtered when routing, ensures caches are cleared when content is deleted or langauges are changed, updates logic for dealing with null invariant content names, adds more validation for saving cultre variants.
This commit is contained in:
@@ -55,8 +55,6 @@ namespace Umbraco.Core.Models
|
||||
Id = 0; // no identity
|
||||
VersionId = 0; // no versions
|
||||
|
||||
//fixme we always need to set the invariant name else an exception will throw if we try to persist
|
||||
Name = name;
|
||||
SetName(culture, name);
|
||||
|
||||
_contentTypeId = contentType.Id;
|
||||
|
||||
@@ -159,20 +159,7 @@ namespace Umbraco.Core.Models
|
||||
return Current.Services.MediaService.GetById(media.ParentId);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Variants
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the content has any property type that allows language variants
|
||||
/// </summary>
|
||||
public static bool HasPropertyTypeVaryingByCulture(this IContent content)
|
||||
{
|
||||
// fixme - what about CultureSegment? what about content.ContentType.Variations?
|
||||
return content.PropertyTypes.Any(x => x.Variations.Has(ContentVariation.CultureNeutral));
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Removes characters that are not valide XML characters from all entity properties
|
||||
/// of type string. See: http://stackoverflow.com/a/961504/5018
|
||||
|
||||
Reference in New Issue
Block a user