From ffde0f48cfeb86e47fcb35b54d4691e3ef29a72a Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 23 Jan 2014 10:35:30 +1100 Subject: [PATCH] Starts wrapping MemberTypeService from the legacy MemberType object. Changes the User.Id to an int - no more casting. Changes CreateMember to CreateMemberWithIdentity for consistency. Adds raiseEvent params to the create/save methods. Updates the MemberTypeService to have consistent naming conventions. Starts wrapping more of the MemberService from the legacy Member object. --- src/umbraco.cms/businesslogic/ContentType.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index 1f14459c40..b31be8a804 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -1149,6 +1149,15 @@ namespace umbraco.cms.businesslogic return; } } + else if (nodeObjectType == new Guid(Constants.ObjectTypes.MemberType)) + { + var memberType = ApplicationContext.Current.Services.MemberTypeService.Get(Id); + if (memberType != null) + { + PopulateContentTypeFromContentTypeBase(memberType); + return; + } + } // TODO: Load master content types using (var dr = SqlHelper.ExecuteReader("Select allowAtRoot, isContainer, Alias,icon,thumbnail,description from cmsContentType where nodeid=" + Id) @@ -1183,9 +1192,8 @@ namespace umbraco.cms.businesslogic RemoveFromDataTypeCache(ct.Alias); // clear anything that uses this as master content type - //TODO: Update to load all content types - //Should this include "ct.nodeObjectType == media.MediaType._objectType" ? - if (ct.nodeObjectType == DocumentType._objectType) + if (ct.nodeObjectType == DocumentType._objectType + || ct.nodeObjectType == media.MediaType._objectType) { //NOTE Changed from "DocumentType.GetAllAsList().FindAll(dt => dt.MasterContentType == id)" to loading master contenttypes directly from the db. //Related to http://issues.umbraco.org/issue/U4-1714