Merge branch '6.0.7' into 6.1.2

This commit is contained in:
Morten Christensen
2013-06-26 15:55:49 +02:00
6 changed files with 163 additions and 12 deletions

View File

@@ -75,7 +75,7 @@ namespace Umbraco.Core.Models
if (contentType.ContentTypeComposition.Any(x => x.CompositionAliases().Any(ContentTypeCompositionExists)))
return false;
if (!ContentTypeCompositionExists(contentType.Alias))
if (ContentTypeCompositionExists(contentType.Alias) == false)
{
_contentTypeComposition.Add(contentType);
OnPropertyChanged(ContentTypeCompositionSelector);

View File

@@ -67,9 +67,9 @@ namespace Umbraco.Core.Persistence.Factories
if (property.HasIdentity)
dto.Id = property.Id;
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer && property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false)
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer)
{
if (property.Value is bool)
if (property.Value is bool || property.PropertyType.DataTypeId == new Guid("38b352c1-e9f8-4fd8-9324-9a2eab06d97a"))
{
int val = Convert.ToInt32(property.Value);
dto.Integer = val;
@@ -77,7 +77,7 @@ namespace Umbraco.Core.Persistence.Factories
else
{
int val;
if (int.TryParse(property.Value.ToString(), out val))
if ((property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false) && int.TryParse(property.Value.ToString(), out val))
{
dto.Integer = val;
}

View File

@@ -203,7 +203,7 @@ namespace Umbraco.Core.Persistence.Repositories
.Where<NodeDto>(x => x.NodeObjectType == new Guid(Constants.ObjectTypes.Document))
.Where<ContentDto>(x => x.ContentTypeId == entity.Id);
var contentDtos = Database.Fetch<DocumentDto, ContentVersionDto, ContentDto, NodeDto>(sql);
var contentDtos = Database.Fetch<ContentDto, NodeDto>(sql);
//Loop through all tracked keys, which corresponds to the ContentTypes that has been removed from the composition
foreach (var key in compositionBase.RemovedContentTypeKeyTracker)
{