diff --git a/src/umbraco.cms/businesslogic/ContentType.cs b/src/umbraco.cms/businesslogic/ContentType.cs index 441f0a464b..0250d29581 100644 --- a/src/umbraco.cms/businesslogic/ContentType.cs +++ b/src/umbraco.cms/businesslogic/ContentType.cs @@ -1298,58 +1298,6 @@ namespace umbraco.cms.businesslogic } return pts.Where(x => x.ContentTypeId == contentTypeId).ToArray(); - - //TODO: Why is this code still here?? revision: 1bd01ec17bf9 - // shouldn't this code be removed/commented out or something????? - // the below code is completely unreachable. - - - // zb-00040 #29889 : fix cache key issues! - // now maintaining a cache of local properties per contentTypeId, then merging when required - // another way would be to maintain a cache of *all* properties, then filter when required - // however it makes it more difficult to figure out what to clear (ie needs to find all children...) - - var tmp = new List(); - var ctypes = new List(); - - if (includeInheritedProperties) - { - // start from contentTypeId and list all ctypes, going up - int c = contentTypeId; - while (c != 0) - { - ctypes.Add(c); - c = umbraco.cms.businesslogic.ContentType.GetContentType(c).MasterContentType; - } - ctypes.Reverse(); // order from the top - } - else - { - // just that one - ctypes.Add(contentTypeId); - } - - foreach (var ctype in ctypes) - { - var ptypes = Cache.GetCacheItem>( - generateCacheKey(Id, ctype), propertyTypesCacheSyncLock, TimeSpan.FromMinutes(10), - delegate - { - var tmp1 = PropertyTypeGroup.GetPropertyTypeGroup(_id).GetPropertyTypes(); - // using (IRecordsReader dr = SqlHelper.ExecuteReader(string.Format( - // @"select id from cmsPropertyType where tabId = {0} and contentTypeId = {1} - // order by sortOrder", _id, ctype))) - // { - // while (dr.Read()) - // tmp1.Add(PropertyType.GetPropertyType(dr.GetInt("id"))); - // } - return tmp1.ToList(); - }); - - tmp.AddRange(ptypes); - } - - return tmp.ToArray(); } // zb-00036 #29889 : yet we may want to be able to get *all* property types @@ -1358,7 +1306,7 @@ namespace umbraco.cms.businesslogic var tmp = new List(); using (IRecordsReader dr = SqlHelper.ExecuteReader(string.Format( - @"select id from cmsPropertyType where tabId = {0}", _id))) + @"select id from cmsPropertyType where propertyTypeGroupId = {0}", _id))) { while (dr.Read()) tmp.Add(PropertyType.GetPropertyType(dr.GetInt("id")));